[PATCH] D66527: [X86][AVX] Add SimplifyDemandedVectorElts support for KSHIFTL/KSHIFTR

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 09:32:24 PDT 2019


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:34280
+  case X86ISD::KSHIFTR: {
+    auto *Amt = dyn_cast<ConstantSDNode>(Op.getOperand(1));
+    if (!Amt || Amt->getAPIntValue().uge(NumElts))
----------------
The RHS should always be a ConstantSDNode. You don't need the dyn_cast. Probably can just assert that it's less the NumElts. We shouldn't form it with out of range values. There's no intrinsic for it. We just use shuffles.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66527/new/

https://reviews.llvm.org/D66527





More information about the llvm-commits mailing list