[PATCH] D96174: [SelectionDAG][AArch64] Restrict matchUnaryPredicate to only handle SPLAT_VECTOR for scalable vectors.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 12:20:36 PST 2021
RKSimon added a comment.
In D96174#2548077 <https://reviews.llvm.org/D96174#2548077>, @frasercrmck wrote:
> In D96174#2548071 <https://reviews.llvm.org/D96174#2548071>, @craig.topper wrote:
>
>> In D96174#2548065 <https://reviews.llvm.org/D96174#2548065>, @david-arm wrote:
>>
>>> Looking in lib/CodeGen/SelectionDAG/TargetLowering.cpp at the places where we call matchUnaryPredicate it looks like "VT.isFixedVector" and "VT.isScalableVector" calls are being used as proxies for BUILD_VECTOR and SPLAT_VECTOR. I suspect that checking for BUILD_VECTOR and SPLAT_VECTOR instead would give the right behaviour? Not suggesting that has to be fixed in this patch though...
>>
>> Yeah that would work, but it feels a little like leaking implementation details of matchUnaryPredicate into the caller.
>
> Agreed. I think it's better than checking the vector type, though. Maybe matchUnaryPredicate could return something to indicate the "root" it matched against?
Have you got a use case where you actually need to know this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96174/new/
https://reviews.llvm.org/D96174
More information about the llvm-commits
mailing list