[SKX] Enabling mask logic instructions: encoding, lowering
[oota-llvm.git] / test / CodeGen / X86 / avx512dq-mask-op.ll
index 19f34282f39525223a4846e34e39f6f8c96ff3b3..32a2633f8d06a85630abf21449325ff77898237f 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86-64 -mcpu=skx | FileCheck %s
+; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=skx | FileCheck %s
 
 define i8 @mask8(i8 %x) {
   %m0 = bitcast i8 %x to <8 x i1>
@@ -23,3 +23,16 @@ define void @mask8_mem(i8* %ptr) {
 ; CHECK-NEXT: kmovb %k{{[0-7]}}, ([[ARG1]])
 ; CHECK: ret
 }
+
+define i8 @mand8(i8 %x, i8 %y) {
+  %ma = bitcast i8 %x to <8 x i1>
+  %mb = bitcast i8 %y to <8 x i1>
+  %mc = and <8 x i1> %ma, %mb
+  %md = xor <8 x i1> %ma, %mb
+  %me = or <8 x i1> %mc, %md
+  %ret = bitcast <8 x i1> %me to i8
+; CHECK: kandb
+; CHECK: kxorb
+; CHECK: korb
+  ret i8 %ret
+}