[PATCH] D139491: [PowerPC] remove XXSWAPD after load from CP which is a splat value
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 00:30:28 PST 2022
shchenz added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:654
.add(MI.getOperand(1));
+ } else if (Immed == 2 && TII->isLoadFromConstantPool(DefMI)) {
+ const Constant *C = TII->getConstantFromConstantPool(DefMI);
----------------
Seems for swap `XXPERMDI` (Immed == 0 || Immed == 3), if the input is a splat constant value, there is also an opportunity to optimize the swap away?
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:672
case PPC::VSPLTH:
case PPC::XXSPLTW: {
unsigned MyOpcode = MI.getOpcode();
----------------
Can we also improve these opcodes with splat constant inputs?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139491/new/
https://reviews.llvm.org/D139491
More information about the llvm-commits
mailing list