[llvm] [X86] LowerShift - don't prematurely lower to x86 vector shift imm instructions (PR #120282)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 02:21:49 PST 2024
================
@@ -30100,10 +30100,10 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
auto *Cst2 = dyn_cast<ConstantSDNode>(Amt2);
if (Cst1 && Cst2 && Cst1->getAPIntValue().ult(EltSizeInBits) &&
Cst2->getAPIntValue().ult(EltSizeInBits)) {
- SDValue Shift1 = getTargetVShiftByConstNode(X86OpcI, dl, VT, R,
- Cst1->getZExtValue(), DAG);
- SDValue Shift2 = getTargetVShiftByConstNode(X86OpcI, dl, VT, R,
- Cst2->getZExtValue(), DAG);
+ SDValue Shift1 = DAG.getNode(
+ Opc, dl, VT, R, DAG.getConstant(Cst1->getZExtValue(), dl, VT));
+ SDValue Shift2 = DAG.getNode(
+ Opc, dl, VT, R, DAG.getConstant(Cst2->getZExtValue(), dl, VT));
----------------
phoebewang wrote:
Is this undef safe? Or we don't need to consider it?
https://github.com/llvm/llvm-project/pull/120282
More information about the llvm-commits
mailing list