aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-07 18:38:01 +0000
committerChris Lattner <sabre@nondot.org>2004-04-07 18:38:01 +0000
commitef09aab9ce34039d1daa15dd4d92170264a09502 (patch)
tree8e3d6e0fbb5a3a56e721104c23e3beefaf4ebed2 /test/Transforms/InstCombine
parent58fe7695b98de2743c6a2a6dd209e1c514f57fbc (diff)
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/getelementptr_index.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/getelementptr_index.ll b/test/Transforms/InstCombine/getelementptr_index.ll
new file mode 100644
index 0000000000..ca7d6e0465
--- /dev/null
+++ b/test/Transforms/InstCombine/getelementptr_index.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep cast
+
+target endian = little
+target pointersize = 32
+
+int* %test(int* %X, long %Idx) {
+ ; Should insert a cast to int on this target
+ %R = getelementptr int* %X, long %Idx
+ ret int* %R
+}