llvm-6502/test/Transforms/InstCombine/vec_insert_to_shuffle.ll
Dan Gohman b1e1e82c54 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 16:50:01 +00:00

20 lines
1.0 KiB
LLVM

; RUN: opt %s -instcombine | llvm-dis | \
; RUN: grep shufflevec | count 1
; RUN: opt %s -instcombine | llvm-dis | \
; RUN: not grep insertelement
; RUN: opt %s -instcombine | llvm-dis | \
; RUN: not grep extractelement
; END.
define <4 x float> @test(<4 x float> %tmp, <4 x float> %tmp1) {
%tmp4 = extractelement <4 x float> %tmp, i32 1 ; <float> [#uses=1]
%tmp2 = extractelement <4 x float> %tmp, i32 3 ; <float> [#uses=1]
%tmp1.upgrd.1 = extractelement <4 x float> %tmp1, i32 0 ; <float> [#uses=1]
%tmp128 = insertelement <4 x float> undef, float %tmp4, i32 0 ; <<4 x float>> [#uses=1]
%tmp130 = insertelement <4 x float> %tmp128, float undef, i32 1 ; <<4 x float>> [#uses=1]
%tmp132 = insertelement <4 x float> %tmp130, float %tmp2, i32 2 ; <<4 x float>> [#uses=1]
%tmp134 = insertelement <4 x float> %tmp132, float %tmp1.upgrd.1, i32 3 ; <<4 x float>> [#uses=1]
ret <4 x float> %tmp134
}