These casts should turn into gep instructions
authorChris Lattner <sabre@nondot.org>
Wed, 12 Apr 2006 18:07:41 +0000 (18:07 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Apr 2006 18:07:41 +0000 (18:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27618 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/cast.ll

index 53bc87ff6aa50a3b091d71ceacc765c77c18829c..e50344019ec03ad02e2a77888a20faf885fbcef1 100644 (file)
@@ -1,5 +1,5 @@
 ; Tests to make sure elimination of casts is working correctly
-
+; RUN: llvm-as < %s | opt -instcombine -disable-output &&
 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep '%c' | not grep cast
 
 %inbuf = external global [32832 x ubyte]
@@ -166,3 +166,14 @@ int %test26(float %F) {
        %D = cast double %c to int
        ret int %D
 }
+
+[4 x float]* %test27([9 x [4 x float]]* %A) {
+        %c = cast [9 x [4 x float]]* %A to [4 x float]*
+       ret [4 x float]* %c
+}
+
+float* %test28([4 x float]* %A) {
+        %c = cast [4 x float]* %A to float*
+       ret float* %c
+}
+