summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/shift-shift.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-04-11 15:19:44 +0000
committerSanjay Patel <spatel@rotateright.com>2016-04-11 15:19:44 +0000
commit2d2d67994c429c0bf28296b6ae47dee5d7c0951d (patch)
treeddeab257858333540813b70928eb15f3e3252a56 /llvm/test/Transforms/InstCombine/shift-shift.ll
parent6f6fa362442ed9e713fbfdc1331324407c134fab (diff)
downloadbcm5719-llvm-2d2d67994c429c0bf28296b6ae47dee5d7c0951d.tar.gz
bcm5719-llvm-2d2d67994c429c0bf28296b6ae47dee5d7c0951d.zip
[InstCombine] replace test that no longer works as intended
This is step 1 of refactoring to solve PR26760: https://llvm.org/bugs/show_bug.cgi?id=26760 llvm-svn: 265946
Diffstat (limited to 'llvm/test/Transforms/InstCombine/shift-shift.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/shift-shift.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/shift-shift.ll b/llvm/test/Transforms/InstCombine/shift-shift.ll
new file mode 100644
index 00000000000..23a45e0967f
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/shift-shift.ll
@@ -0,0 +1,22 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
+; This would crash if we didn't check for a negative shift.
+
+define void @pr12967() {
+; CHECK-LABEL: @pr12967(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label %loop
+; CHECK: loop:
+; CHECK-NEXT: br label %loop
+;
+entry:
+ br label %loop
+
+loop:
+ %c = phi i32 [ %shl, %loop ], [ undef, %entry ]
+ %shr = shl i32 %c, 7
+ %shl = lshr i32 %shr, -2
+ br label %loop
+}
+
OpenPOWER on IntegriCloud