[llvm] [X86] getScalarMaskingNode - if the mask is zero just return the preserved source value (PR #153575)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 14 07:36:56 PDT 2025
================
@@ -26261,10 +26261,8 @@ static SDValue getScalarMaskingNode(SDValue Op, SDValue Mask,
SDValue PreservedSrc,
const X86Subtarget &Subtarget,
SelectionDAG &DAG) {
-
if (auto *MaskConst = dyn_cast<ConstantSDNode>(Mask))
- if (MaskConst->getZExtValue() & 0x1)
- return Op;
+ return (MaskConst->getZExtValue() & 0x1) ? Op : PreservedSrc;
----------------
phoebewang wrote:
I guess it's not correct. The upper elements in scalar comes from operand 1 instead of `passThru`.
https://github.com/llvm/llvm-project/pull/153575
More information about the llvm-commits
mailing list