[PATCH] D17138: AVX512: Change store size of kmask.

Igor Breger via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 07:11:08 PST 2016


igorb marked an inline comment as done.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:11979
@@ -11978,5 +11978,3 @@
   unsigned IdxVal = cast<ConstantSDNode>(Idx)->getZExtValue();
-  const TargetRegisterClass* rc = getRegClassFor(VecVT);
-  if (!Subtarget.hasDQI() && (VecVT.getVectorNumElements() <= 8))
-    rc = getRegClassFor(MVT::v16i1);
-  unsigned MaxSift = rc->getSize()*8 - 1;
+  if (!Subtarget.hasDQI() && (VecVT.getVectorNumElements() <= 8)) {
+    // Use kshiftlw/rw instruction.
----------------
delena wrote:
> You, probably, need a test that covers these new lines.
Test already exist in avx512-insert-extract.ll , KNL and SKL are tested.

define i64 @test12(<16 x i64>%a, <16 x i64>%b, i64 %a1, i64 %b1) {
  %cmpvector_func.i = icmp slt <16 x i64> %a, %b
  %extract24vector_func.i = extractelement <16 x i1> %cmpvector_func.i, i32 0
  %res = select i1 %extract24vector_func.i, i64 %a1, i64 %b1
  ret i64 %res
}

define i64 @test14(<8 x i64>%a, <8 x i64>%b, i64 %a1, i64 %b1) {
  %cmpvector_func.i = icmp slt <8 x i64> %a, %b
  %extract24vector_func.i = extractelement <8 x i1> %cmpvector_func.i, i32 4
  %res = select i1 %extract24vector_func.i, i64 %a1, i64 %b1
  ret i64 %res
}


Repository:
  rL LLVM

http://reviews.llvm.org/D17138





More information about the llvm-commits mailing list