[llvm] r352993 - [x86] add CGP uaddo test with weird type; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 3 06:22:43 PST 2019


Author: spatel
Date: Sun Feb  3 06:22:43 2019
New Revision: 352993

URL: http://llvm.org/viewvc/llvm-project?rev=352993&view=rev
Log:
[x86] add CGP uaddo test with weird type; NFC

There's probably no reason to try this transform
for an obviously unsupported op.

Modified:
    llvm/trunk/test/CodeGen/X86/codegen-prepare-uaddo.ll

Modified: llvm/trunk/test/CodeGen/X86/codegen-prepare-uaddo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/codegen-prepare-uaddo.ll?rev=352993&r1=352992&r2=352993&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/codegen-prepare-uaddo.ll (original)
+++ llvm/trunk/test/CodeGen/X86/codegen-prepare-uaddo.ll Sun Feb  3 06:22:43 2019
@@ -249,4 +249,23 @@ define void @test_18446744073709551615(i
   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)




More information about the llvm-commits mailing list