summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-02-03 14:22:43 +0000
committerSanjay Patel <spatel@rotateright.com>2019-02-03 14:22:43 +0000
commit3d6ecfc078e45565ffca3cc5bdf025587ee3de50 (patch)
tree2237f7207e62e2513b1e804b17971ee603b39d81 /llvm
parentb961bd68f0e7a454a955d7ee3a5bda7659e0ceee (diff)
downloadbcm5719-llvm-3d6ecfc078e45565ffca3cc5bdf025587ee3de50.tar.gz
bcm5719-llvm-3d6ecfc078e45565ffca3cc5bdf025587ee3de50.zip
[x86] add CGP uaddo test with weird type; NFC
There's probably no reason to try this transform for an obviously unsupported op. llvm-svn: 352993
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/CodeGen/X86/codegen-prepare-uaddo.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/codegen-prepare-uaddo.ll b/llvm/test/CodeGen/X86/codegen-prepare-uaddo.ll
index 1ac9eb24440..dbf32f0782f 100644
--- a/llvm/test/CodeGen/X86/codegen-prepare-uaddo.ll
+++ b/llvm/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)
OpenPOWER on IntegriCloud