mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[InstSimplify] add vector select tests with undef elts in condition; NFC
llvm-svn: 325419
This commit is contained in:
parent
06d4b71ddb
commit
4720891604
@ -25,6 +25,26 @@ define <2 x i8> @vsel_mixedvec() {
|
||||
ret <2 x i8> %s
|
||||
}
|
||||
|
||||
; FIXME: Allow for undef elements in a constant vector condition.
|
||||
|
||||
define <3 x i8> @vsel_undef_true_op(<3 x i8> %x, <3 x i8> %y) {
|
||||
; CHECK-LABEL: @vsel_undef_true_op(
|
||||
; CHECK-NEXT: [[S:%.*]] = select <3 x i1> <i1 true, i1 undef, i1 true>, <3 x i8> [[X:%.*]], <3 x i8> [[Y:%.*]]
|
||||
; CHECK-NEXT: ret <3 x i8> [[S]]
|
||||
;
|
||||
%s = select <3 x i1><i1 1, i1 undef, i1 1>, <3 x i8> %x, <3 x i8> %y
|
||||
ret <3 x i8> %s
|
||||
}
|
||||
|
||||
define <3 x i4> @vsel_undef_false_op(<3 x i4> %x, <3 x i4> %y) {
|
||||
; CHECK-LABEL: @vsel_undef_false_op(
|
||||
; CHECK-NEXT: [[S:%.*]] = select <3 x i1> <i1 false, i1 undef, i1 undef>, <3 x i4> [[X:%.*]], <3 x i4> [[Y:%.*]]
|
||||
; CHECK-NEXT: ret <3 x i4> [[S]]
|
||||
;
|
||||
%s = select <3 x i1><i1 0, i1 undef, i1 undef>, <3 x i4> %x, <3 x i4> %y
|
||||
ret <3 x i4> %s
|
||||
}
|
||||
|
||||
define i32 @test1(i32 %x) {
|
||||
; CHECK-LABEL: @test1(
|
||||
; CHECK-NEXT: ret i32 %x
|
||||
|
Loading…
Reference in New Issue
Block a user