From ef09aab9ce34039d1daa15dd4d92170264a09502 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 7 Apr 2004 18:38:01 +0000 Subject: [PATCH] New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12761 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/getelementptr_index.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/Transforms/InstCombine/getelementptr_index.ll diff --git a/test/Transforms/InstCombine/getelementptr_index.ll b/test/Transforms/InstCombine/getelementptr_index.ll new file mode 100644 index 00000000000..ca7d6e0465d --- /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 +}