Skip to content

Commit a599e13

Browse files
committed
[X86] Add VPTERNLOG test cases where the root node will be X86ISD::ANDNP. NFC
We currently fail to match this.
1 parent c814eca commit a599e13

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

llvm/test/CodeGen/X86/avx512vl-logic.ll

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,3 +1297,27 @@ define <4 x i64> @ternlog_masky_xor_and_mask_ymm(<4 x i64> %x, <4 x i64> %y, <4
12971297
%c = select <4 x i1> %m, <4 x i64> %b, <4 x i64> %y
12981298
ret <4 x i64> %c
12991299
}
1300+
1301+
define <4 x i32> @ternlog_andn_or(<4 x i32> %x, <4 x i32> %y, <4 x i32> %z) {
1302+
; CHECK-LABEL: ternlog_andn_or:
1303+
; CHECK: ## %bb.0:
1304+
; CHECK-NEXT: vorps %xmm2, %xmm1, %xmm1
1305+
; CHECK-NEXT: vandnps %xmm1, %xmm0, %xmm0
1306+
; CHECK-NEXT: retq
1307+
%a = xor <4 x i32> %x, <i32 -1, i32 -1, i32 -1, i32 -1>
1308+
%b = or <4 x i32> %y, %z
1309+
%c = and <4 x i32> %a, %b
1310+
ret <4 x i32> %c
1311+
}
1312+
1313+
define <4 x i32> @ternlog_andn_or_2(<4 x i32> %x, <4 x i32> %y, <4 x i32> %z) {
1314+
; CHECK-LABEL: ternlog_andn_or_2:
1315+
; CHECK: ## %bb.0:
1316+
; CHECK-NEXT: vorps %xmm2, %xmm1, %xmm1
1317+
; CHECK-NEXT: vandnps %xmm0, %xmm1, %xmm0
1318+
; CHECK-NEXT: retq
1319+
%a = or <4 x i32> %y, %z
1320+
%b = xor <4 x i32> %a, <i32 -1, i32 -1, i32 -1, i32 -1>
1321+
%c = and <4 x i32> %x, %b
1322+
ret <4 x i32> %c
1323+
}

0 commit comments

Comments
 (0)