[PATCH] D94501: [SelectionDAG] Support scalable-vector splats in more cases
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 16:35:24 PST 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:5316
SDValue One = DAG.getConstant(1, dl, VT);
- SDValue IsOne = DAG.getSetCC(dl, VT, N1, One, ISD::SETEQ);
+ SDValue IsOne = DAG.getSetCC(dl, SetCCVT, N1, One, ISD::SETEQ);
return DAG.getSelect(dl, VT, IsOne, N0, Q);
----------------
frasercrmck wrote:
> craig.topper wrote:
> > I'm a bit surprised this didn't affect AVX512 on X86.
> Should we double-check that AVX512 has tested this code path?
Looks like both operands to getSetCC are both constant vectors so this gets constant folded on non-scalable vectors. Then the getSelect will constant fold based on the condition being a constant. So maybe that's why AVX512 doesn't care.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94501/new/
https://reviews.llvm.org/D94501
More information about the llvm-commits
mailing list