summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll')
-rw-r--r--test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll b/test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll
new file mode 100644
index 0000000..a4c05d2
--- /dev/null
+++ b/test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple=thumbv6-apple-ios -mcpu=cortex-m0 < %s | FileCheck %s
+; Cortex-M0 doesn't have 32-bit Thumb2 instructions (except for dmb, mrs, etc.)
+; rdar://11331541
+
+define i32 @t(i32 %a) nounwind {
+; CHECK: t:
+; CHECK: asrs [[REG1:(r[0-9]+)]], [[REG2:(r[0-9]+)]], #31
+; CHECK: eors [[REG1]], [[REG2]]
+ %tmp0 = ashr i32 %a, 31
+ %tmp1 = xor i32 %tmp0, %a
+ ret i32 %tmp1
+}
OpenPOWER on IntegriCloud