summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-12-10 09:14:52 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-12-10 09:14:52 +0000
commitae707582c024e5db30f13d3fc3a7f21e72c4bc18 (patch)
tree79fb236821bcc58280ef4e8927a6233e406eaea4 /llvm/test/Transforms
parent0104ff65294a1a56af4b7260a57ed4da9ddf8af7 (diff)
downloadbcm5719-llvm-ae707582c024e5db30f13d3fc3a7f21e72c4bc18.tar.gz
bcm5719-llvm-ae707582c024e5db30f13d3fc3a7f21e72c4bc18.zip
InstSimplify: [al]shr exact undef, %X -> undef
Exact shifts always keep the non-zero bits of their input. This means it keeps it's undef bits. llvm-svn: 223923
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstSimplify/undef.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/undef.ll b/llvm/test/Transforms/InstSimplify/undef.ll
index a6ae7a9fbf7..3742d7450af 100644
--- a/llvm/test/Transforms/InstSimplify/undef.ll
+++ b/llvm/test/Transforms/InstSimplify/undef.ll
@@ -174,3 +174,17 @@ define i32 @test21(i32 %a) {
%b = sdiv i32 %a, 0
ret i32 %b
}
+
+; CHECK-LABEL: @test22
+; CHECK: ret i32 undef
+define i32 @test22(i32 %a) {
+ %b = ashr exact i32 undef, %a
+ ret i32 %b
+}
+
+; CHECK-LABEL: @test23
+; CHECK: ret i32 undef
+define i32 @test23(i32 %a) {
+ %b = lshr exact i32 undef, %a
+ ret i32 %b
+}
OpenPOWER on IntegriCloud