[PATCH] D71743: [ARM][MVE] Enable masked gathers from vector of pointers
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 02:11:30 PST 2019
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:547
+ // Do only allow non-extending v4i32 gathers for now
+ return NumElements == 4 && ElemSize == 32 && Alignment == 4;
+}
----------------
Alignment >= 4
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:552
+ bool &ModifiedDT) const {
+ if (!EnableMaskedGatherScatters)
+ return false;
----------------
We should add the "ST->hasMVEIntegerOps()" check here too.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:568
+ Ty->getScalarSizeInBits(), Alignment))
+ return false;
+
----------------
I think it would be useful to add debug comments for what is happening, which will become more useful as we add more variants in here. Especially around why and where we have decided not to transform.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:598
+
+ if (Load && !isa<UndefValue>(PassThru) && !match(PassThru, m_Zero())) {
+ Load = Builder.CreateSelect(Mask, Load, PassThru);
----------------
You can drop the brackets if there is only a single statement in the if block.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71743/new/
https://reviews.llvm.org/D71743
More information about the llvm-commits
mailing list