summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM64
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-03 09:36:05 +0000
committerTim Northover <tnorthover@apple.com>2014-04-03 09:36:05 +0000
commit107283d7cb7ea4fd34f6f417fb9202d47d0ababe (patch)
tree08a72d82c99058732c964acdac47212ec8b3394c /test/CodeGen/ARM64
parent27d489f3b2bcdb328bd0048216044f6285f4f5a0 (diff)
downloadllvm-107283d7cb7ea4fd34f6f417fb9202d47d0ababe.tar.gz
llvm-107283d7cb7ea4fd34f6f417fb9202d47d0ababe.tar.bz2
llvm-107283d7cb7ea4fd34f6f417fb9202d47d0ababe.tar.xz
ARM64: add regression test for r205519.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM64')
-rw-r--r--test/CodeGen/ARM64/regress-interphase-shift.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/ARM64/regress-interphase-shift.ll b/test/CodeGen/ARM64/regress-interphase-shift.ll
new file mode 100644
index 0000000000..fddf59195d
--- /dev/null
+++ b/test/CodeGen/ARM64/regress-interphase-shift.ll
@@ -0,0 +1,29 @@
+; RUN: llc -march=arm64 -o - %s | FileCheck %s
+
+; This is mostly a "don't assert" test. The type of the RHS of a shift depended
+; on the phase of legalization, which led to the creation of an unexpected and
+; unselectable "rotr" node: (i32 (rotr i32, i64)).
+
+define void @foo(i64* nocapture %d) {
+; CHECK-LABEL: foo:
+; CHECK: rorv
+ %tmp = load i64* undef, align 8
+ %sub397 = sub i64 0, %tmp
+ %and398 = and i64 %sub397, 4294967295
+ %shr404 = lshr i64 %and398, 0
+ %or405 = or i64 0, %shr404
+ %xor406 = xor i64 %or405, 0
+ %xor417 = xor i64 0, %xor406
+ %xor428 = xor i64 0, %xor417
+ %sub430 = sub i64 %xor417, 0
+ %and431 = and i64 %sub430, 4294967295
+ %and432 = and i64 %xor428, 31
+ %sub433 = sub i64 32, %and432
+ %shl434 = shl i64 %and431, %sub433
+ %shr437 = lshr i64 %and431, %and432
+ %or438 = or i64 %shl434, %shr437
+ %xor439 = xor i64 %or438, %xor428
+ %sub441 = sub i64 %xor439, 0
+ store i64 %sub441, i64* %d, align 8
+ ret void
+}