diff --git a/test/Transforms/InstCombine/getelementptr_cast.ll b/test/Transforms/InstCombine/getelementptr_cast.ll new file mode 100644 index 00000000000..ece73f77100 --- /dev/null +++ b/test/Transforms/InstCombine/getelementptr_cast.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'getelementptr.*cast' +%G = external global [3 x sbyte] + +implementation + +ubyte *%foo(uint %Idx) { +%tmp = getelementptr ubyte* cast ([3 x sbyte]* %G to ubyte*), uint %Idx +ret ubyte* %tmp +}