[PATCH] D78728: [ARM] Convert floating point splats to integer
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 11 13:28:41 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6436
/// codegen can spot all lanes are identical.
-bool CodeGenPrepare::optimizeShuffleVectorInst(ShuffleVectorInst *SVI) {
+bool CodeGenPrepare::sinkShuffleVectorToShift(ShuffleVectorInst *SVI) {
BasicBlock *DefBB = SVI->getParent();
----------------
I guess this is only loosely related to your patch, but should this transform also be handled by tryToSinkFreeOperands?
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6525
+ if (auto *Op = dyn_cast<Instruction>(BCI->getOperand(0)))
+ if (BCI->getParent() != Op->getParent() && !isa<PHINode>(Op))
+ BCI->moveAfter(Op);
----------------
Checking whether an insertion point is legal is more complicated than this. In particular, you can't insert code after an invoke/callbr, and you can't insert code into a block terminated by a catchswitch.
I'm not sure if there's a helper for this check anywhere.
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:15786
+Type *ARMTargetLowering::shouldConvertSplatType(Instruction *SVI) const {
+ if (!Subtarget->hasMVEIntegerOps())
----------------
Is this specifically a ShuffleVectorInst?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78728/new/
https://reviews.llvm.org/D78728
More information about the llvm-commits
mailing list