[X86] Add VPTERNLOG test cases where the root node will be X86ISD::ANDNP. NFC

We currently fail to match this.
This commit is contained in:
Craig Topper 2020-08-08 12:50:33 -07:00
parent c814eca3e4
commit a599e1320c
1 changed files with 24 additions and 0 deletions

View File

@ -1297,3 +1297,27 @@ define <4 x i64> @ternlog_masky_xor_and_mask_ymm(<4 x i64> %x, <4 x i64> %y, <4
%c = select <4 x i1> %m, <4 x i64> %b, <4 x i64> %y
ret <4 x i64> %c
}
define <4 x i32> @ternlog_andn_or(<4 x i32> %x, <4 x i32> %y, <4 x i32> %z) {
; CHECK-LABEL: ternlog_andn_or:
; CHECK: ## %bb.0:
; CHECK-NEXT: vorps %xmm2, %xmm1, %xmm1
; CHECK-NEXT: vandnps %xmm1, %xmm0, %xmm0
; CHECK-NEXT: retq
%a = xor <4 x i32> %x, <i32 -1, i32 -1, i32 -1, i32 -1>
%b = or <4 x i32> %y, %z
%c = and <4 x i32> %a, %b
ret <4 x i32> %c
}
define <4 x i32> @ternlog_andn_or_2(<4 x i32> %x, <4 x i32> %y, <4 x i32> %z) {
; CHECK-LABEL: ternlog_andn_or_2:
; CHECK: ## %bb.0:
; CHECK-NEXT: vorps %xmm2, %xmm1, %xmm1
; CHECK-NEXT: vandnps %xmm0, %xmm1, %xmm0
; CHECK-NEXT: retq
%a = or <4 x i32> %y, %z
%b = xor <4 x i32> %a, <i32 -1, i32 -1, i32 -1, i32 -1>
%c = and <4 x i32> %x, %b
ret <4 x i32> %c
}