forked from OSchip/llvm-project
add vector tests to show missing transform
llvm-svn: 274876
This commit is contained in:
parent
d9d02d8259
commit
647174c8a4
|
@ -445,6 +445,28 @@ define i32 @orsext_to_sel_swap(i32 %x, i1 %y) {
|
|||
ret i32 %or
|
||||
}
|
||||
|
||||
define <2 x i32> @orsext_to_sel_vec(<2 x i32> %x, <2 x i1> %y) {
|
||||
; CHECK-LABEL: @orsext_to_sel_vec(
|
||||
; CHECK-NEXT: [[SEXT:%.*]] = sext <2 x i1> %y to <2 x i32>
|
||||
; CHECK-NEXT: [[OR:%.*]] = or <2 x i32> [[SEXT]], %x
|
||||
; CHECK-NEXT: ret <2 x i32> [[OR]]
|
||||
;
|
||||
%sext = sext <2 x i1> %y to <2 x i32>
|
||||
%or = or <2 x i32> %sext, %x
|
||||
ret <2 x i32> %or
|
||||
}
|
||||
|
||||
define <2 x i132> @orsext_to_sel_vec_swap(<2 x i132> %x, <2 x i1> %y) {
|
||||
; CHECK-LABEL: @orsext_to_sel_vec_swap(
|
||||
; CHECK-NEXT: [[SEXT:%.*]] = sext <2 x i1> %y to <2 x i132>
|
||||
; CHECK-NEXT: [[OR:%.*]] = or <2 x i132> [[SEXT]], %x
|
||||
; CHECK-NEXT: ret <2 x i132> [[OR]]
|
||||
;
|
||||
%sext = sext <2 x i1> %y to <2 x i132>
|
||||
%or = or <2 x i132> %x, %sext
|
||||
ret <2 x i132> %or
|
||||
}
|
||||
|
||||
define i32 @test39(i32 %a, i32 %b) {
|
||||
; CHECK-LABEL: @test39(
|
||||
; CHECK-NEXT: [[OR:%.*]] = or i32 %a, %b
|
||||
|
|
Loading…
Reference in New Issue