@@ -1297,3 +1297,27 @@ define <4 x i64> @ternlog_masky_xor_and_mask_ymm(<4 x i64> %x, <4 x i64> %y, <4
1297
1297
%c = select <4 x i1 > %m , <4 x i64 > %b , <4 x i64 > %y
1298
1298
ret <4 x i64 > %c
1299
1299
}
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