[PATCH] D82911: [PowerPC][Power10] Exploit the xxspltiw and xxspltidp instructions.
Victor Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 11:54:39 PDT 2020
NeHuang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:9343
+ // turned into a 4-byte splat of 0xABABABAB.
+ if (Subtarget.hasPrefixInstrs() && SplatSize == 2)
+ return getCanonicalConstSplat((SplatBits |= SplatBits << 16), SplatSize * 2,
----------------
Is it better to combine these two conditions? Seems only the first argument of `getCanonicalConstSplat` depends on `SplatSize`.
```
if (Subtarget.hasPrefixInstrs() && (SplatSize == 2 || SplatSize == 4))
return getCanonicalConstSplat ((SplatSize == 2) ? (SplatBits |= SplatBits << 16) : SplatBits, 4, Op.getValueType(), DAG, dl)
```
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:16323
unsigned Opcode = N->getOpcode();
- unsigned TargetOpcode;
-
- switch (Opcode) {
+ unsigned TargetOpcode; switch (Opcode) {
default:
----------------
Undo this change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82911/new/
https://reviews.llvm.org/D82911
More information about the llvm-commits
mailing list