[PATCH] D96174: [SelectionDAG][AArch64] Restrict matchUnaryPredicate to only handle SPLAT_VECTOR for scalable vectors.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 01:38:17 PST 2021


frasercrmck added a comment.

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?


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