summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-04-12 02:53:51 +0000
committerJuergen Ributzka <juergen@apple.com>2014-04-12 02:53:51 +0000
commit2aa7106dd6cf0ee59a114d7ddcc50d1ba4ee687d (patch)
tree9a589200ae334df2010077a1301500855538ce84 /test/Transforms
parent940b67465dbd12240dfc3d88288b2da9563ccdd7 (diff)
downloadllvm-2aa7106dd6cf0ee59a114d7ddcc50d1ba4ee687d.tar.gz
llvm-2aa7106dd6cf0ee59a114d7ddcc50d1ba4ee687d.tar.bz2
llvm-2aa7106dd6cf0ee59a114d7ddcc50d1ba4ee687d.tar.xz
[ARM64] Never hoist the shift value of a shift instruction.
There is no need to check if we want to hoist the immediate value of an shift instruction. Simply return TCC_Free right away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/ConstantHoisting/ARM64/large-immediate.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/ConstantHoisting/ARM64/large-immediate.ll b/test/Transforms/ConstantHoisting/ARM64/large-immediate.ll
index 92ad6ee70d..575be791d9 100644
--- a/test/Transforms/ConstantHoisting/ARM64/large-immediate.ll
+++ b/test/Transforms/ConstantHoisting/ARM64/large-immediate.ll
@@ -16,3 +16,12 @@ define i512 @test2(i512 %a) nounwind {
%2 = or i512 %1, 7
ret i512 %2
}
+
+; Check that we don't hoist the shift value of a shift instruction.
+define i512 @test3(i512 %a) nounwind {
+; CHECK-LABEL: test3
+; CHECK-NOT: %const = bitcast i512 504 to i512
+ %1 = shl i512 %a, 504
+ %2 = ashr i512 %1, 504
+ ret i512 %2
+}