-; RUN: llvm-as < %s | opt -instcombine | llc -march=ppc32 -mcpu=g5 | not grep vperm &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsldoi | wc -l | grep 2 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vmrgh | wc -l | grep 6 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vmrgl | wc -l | grep 6 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vpkuhum | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vpkuwum | wc -l | grep 1
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | \
+; RUN: llc -march=ppc32 -mcpu=g5 | not grep vperm
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 > %t
+; RUN: grep vsldoi %t | count 2
+; RUN: grep vmrgh %t | count 7
+; RUN: grep vmrgl %t | count 6
+; RUN: grep vpkuhum %t | count 1
+; RUN: grep vpkuwum %t | count 1
void %VSLDOI_xy(<8 x short>* %A, <8 x short>* %B) {
entry:
void %tw_h(<4 x int>* %A, <4 x int>* %B) {
entry:
+ %tmp = load <4 x int>* %A ; <<4 x int>> [#uses=2]
+ %tmp2 = load <4 x int>* %B ; <<4 x int>> [#uses=2]
+ %tmp = extractelement <4 x int> %tmp2, uint 0 ; <int> [#uses=1]
+ %tmp3 = extractelement <4 x int> %tmp, uint 0 ; <int> [#uses=1]
+ %tmp4 = extractelement <4 x int> %tmp2, uint 1 ; <int> [#uses=1]
+ %tmp5 = extractelement <4 x int> %tmp, uint 1 ; <int> [#uses=1]
+ %tmp6 = insertelement <4 x int> undef, int %tmp, uint 0 ; <<4 x int>> [#uses=1]
+ %tmp7 = insertelement <4 x int> %tmp6, int %tmp3, uint 1 ; <<4 x int>> [#uses=1]
+ %tmp8 = insertelement <4 x int> %tmp7, int %tmp4, uint 2 ; <<4 x int>> [#uses=1]
+ %tmp9 = insertelement <4 x int> %tmp8, int %tmp5, uint 3 ; <<4 x int>> [#uses=1]
+ store <4 x int> %tmp9, <4 x int>* %A
+ ret void
+}
+
+void %tw_h_flop(<4 x int>* %A, <4 x int>* %B) {
%tmp = load <4 x int>* %A ; <<4 x int>> [#uses=2]
%tmp2 = load <4 x int>* %B ; <<4 x int>> [#uses=2]
%tmp = extractelement <4 x int> %tmp, uint 0 ; <int> [#uses=1]
ret void
}
+
void %VMRG_UNARY_tb_l(<16 x sbyte>* %A, <16 x sbyte>* %B) {
entry:
%tmp = load <16 x sbyte>* %A ; <<16 x sbyte>> [#uses=16]