From ffad2712554aaa6fb5280e50e8ec0fb2c37ec719 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Sun, 3 Feb 2019 14:22:43 +0000 Subject: [PATCH] [x86] add CGP uaddo test with weird type; NFC There's probably no reason to try this transform for an obviously unsupported op. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352993 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/codegen-prepare-uaddo.ll | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/CodeGen/X86/codegen-prepare-uaddo.ll b/test/CodeGen/X86/codegen-prepare-uaddo.ll index 1ac9eb24440..dbf32f0782f 100644 --- a/test/CodeGen/X86/codegen-prepare-uaddo.ll +++ b/test/CodeGen/X86/codegen-prepare-uaddo.ll @@ -249,4 +249,23 @@ define void @test_18446744073709551615(i64*, i64*) { ret void } +define i1 @illegal_type(i17 %x, i17* %p) { +; CHECK-LABEL: illegal_type: +; CHECK: # %bb.0: +; CHECK-NEXT: andl $131071, %edi # imm = 0x1FFFF +; CHECK-NEXT: addl $29, %edi +; CHECK-NEXT: movl %edi, %ecx +; CHECK-NEXT: andl $131071, %ecx # imm = 0x1FFFF +; CHECK-NEXT: cmpl %edi, %ecx +; CHECK-NEXT: setne %al +; CHECK-NEXT: movw %di, (%rsi) +; CHECK-NEXT: shrl $16, %ecx +; CHECK-NEXT: movb %cl, 2(%rsi) +; CHECK-NEXT: retq + %a = add i17 %x, 29 + store i17 %a, i17* %p + %ov = icmp ult i17 %a, 29 + ret i1 %ov +} + declare { i8, i64 } @llvm.x86.addcarry.64(i8, i64, i64) -- 2.50.1