aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll b/test/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll
new file mode 100644
index 0000000000..9e77df948a
--- /dev/null
+++ b/test/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
+}
+