summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-20 01:47:49 +0000
committerChris Lattner <sabre@nondot.org>2004-07-20 01:47:49 +0000
commit247d62c77bc2efd14fb52b223808af7021807da9 (patch)
tree35eecd64715ad1cc77ec608f8c07df7f609ce4d6 /test
parentaf17b1df84c31cb4f9a09213db9aa3c1e8b910ea (diff)
downloadllvm-247d62c77bc2efd14fb52b223808af7021807da9.tar.gz
llvm-247d62c77bc2efd14fb52b223808af7021807da9.tar.bz2
llvm-247d62c77bc2efd14fb52b223808af7021807da9.tar.xz
New testcase that instcombine should help out with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/GEPIdxCanon.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/GEPIdxCanon.ll b/test/Transforms/InstCombine/GEPIdxCanon.ll
new file mode 100644
index 0000000000..0dcce2d794
--- /dev/null
+++ b/test/Transforms/InstCombine/GEPIdxCanon.ll
@@ -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
+}