summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/2003-06-22-ConstantExprCrash.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/2003-06-22-ConstantExprCrash.ll')
-rw-r--r--test/Transforms/InstCombine/2003-06-22-ConstantExprCrash.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2003-06-22-ConstantExprCrash.ll b/test/Transforms/InstCombine/2003-06-22-ConstantExprCrash.ll
new file mode 100644
index 000000000000..d6cacece0890
--- /dev/null
+++ b/test/Transforms/InstCombine/2003-06-22-ConstantExprCrash.ll
@@ -0,0 +1,13 @@
+; This is a bug in the VMcode library, not instcombine, it's just convenient
+; to expose it here.
+
+; RUN: llvm-as < %s | opt -instcombine -disable-output
+
+@A = global i32 1 ; <i32*> [#uses=1]
+@B = global i32 2 ; <i32*> [#uses=1]
+
+define i1 @test() {
+ %C = icmp ult i32* getelementptr (i32* @A, i64 1), getelementptr (i32* @B, i64 2) ; <i1> [#uses=1]
+ ret i1 %C
+}
+