From 8344a953a550892a2eb29b0509a564799ad59976 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 7 Apr 2004 18:38:01 +0000 Subject: [PATCH] New testcase llvm-svn: 12761 --- .../Transforms/InstCombine/getelementptr_index.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/Regression/Transforms/InstCombine/getelementptr_index.ll diff --git a/test/Regression/Transforms/InstCombine/getelementptr_index.ll b/test/Regression/Transforms/InstCombine/getelementptr_index.ll new file mode 100644 index 00000000000..ca7d6e0465d --- /dev/null +++ b/test/Regression/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 +}