[PATCH] D66295: [ARM] Sink add/mul(shufflevector(insertelement(...), ...), ...) for MVE instruction selection
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 12:14:37 PDT 2019
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:14317
+ unsigned Opc = Insn->getOpcode();
+ if (Opc != Instruction::Add && Opc != Instruction::Mul)
+ return false;
----------------
Is it possible to come up with a way to not have to repeat which instructions can be sunk to? Possibly considering things like vsub, which can only be sunk if the operand is the second instruction (although that is not your problem here, it will likely be someones problem soon enough).
================
Comment at: llvm/test/Transforms/CodeGenPrepare/ARM/sink-add-mul-shufflevector.ll:129
+ %wide.load18 = load <4 x i32>, <4 x i32>* %8, align 4
+ %9 = sub nsw <4 x i32> %wide.load18, %broadcast.splat16
+ %10 = getelementptr inbounds i32, i32* %d2, i32 %index
----------------
Can you change this to the first operand of the sub. There is technically an MVE VSUB instruction that takes a grp as the second operand, and I presume eventually we will be looking at making that perform the same trick we have here for add and mul.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66295/new/
https://reviews.llvm.org/D66295
More information about the llvm-commits
mailing list