summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Regression/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll')
-rw-r--r--llvm/test/Regression/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll b/llvm/test/Regression/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll
new file mode 100644
index 00000000000..9e77df948a2
--- /dev/null
+++ b/llvm/test/Regression/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll
@@ -0,0 +1,13 @@
+; This testcase caused the combiner to go into an infinite loop, moving the
+; cast back and forth, changing the seteq to operate on int vs uint and back.
+
+; RUN: llvm-as < %s | opt -instcombine -disable-output
+
+bool %test(uint %A, int %B) {
+ %C = sub uint 0, %A
+ %Cc = cast uint %C to int
+ %D = sub int 0, %B
+ %E = seteq int %Cc, %D
+ ret bool %E
+}
+
OpenPOWER on IntegriCloud