[PATCH] D119090: [X86] Improve uniform funnelshift/rotation amount handling
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 12 05:56:35 PST 2022
pengfei added a comment.
In D119090#3314076 <https://reviews.llvm.org/D119090#3314076>, @RKSimon wrote:
> In D119090#3314049 <https://reviews.llvm.org/D119090#3314049>, @pengfei wrote:
>
>>> and can be a problem when the scalar type is illegal (i.e. i64 vs v2i64 on 32-bit targets).
>>
>> Didn't find a case for v2i64. Do we need to add one?
>
> We're currently protected against this with a legality check inside X86TargetLowering::isSplatValueForTargetNode that can be removed once we don't use SelectionDAG::getSplatValue anymore (and I'm hoping to remove getSplatValue entirely) - if we remove it it does currently crash in a number of places that lowers vector shifts later. It's a good example of why I'm having to piecemeal transition the shift-by-scalar lowering, there's a number of crashes and regressions that all need to be cleaned up in the right order :-(
>
> switch (Opc) {
> case X86ISD::VBROADCAST:
> case X86ISD::VBROADCAST_LOAD:
> // TODO: Permit vXi64 types on 32-bit targets.
> if (isTypeLegal(Op.getValueType().getVectorElementType())) {
> UndefElts = APInt::getNullValue(NumElts);
> return true;
> }
> return false;
> }
Got it, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119090/new/
https://reviews.llvm.org/D119090
More information about the llvm-commits
mailing list