New testcase that instcombine should help out with.
authorChris Lattner <sabre@nondot.org>
Tue, 20 Jul 2004 01:47:49 +0000 (01:47 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Jul 2004 01:47:49 +0000 (01:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15023 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/GEPIdxCanon.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/GEPIdxCanon.ll b/test/Transforms/InstCombine/GEPIdxCanon.ll
new file mode 100644 (file)
index 0000000..0dcce2d
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine -gcse -instcombine | llvm-dis | not grep getelementptr
+
+bool %test(int* %A) {
+       %B = getelementptr int* %A, int 1
+       %C = getelementptr int* %A, uint 1
+       %V = seteq int* %B, %C
+       ret bool %V
+}