[PATCH] D82911: [PowerPC][Power10] Exploit the xxspltiw and xxspltidp instructions.
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 12:27:12 PDT 2020
lei 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,
----------------
NeHuang wrote:
> 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)
> ```
I can do that, don't feel strongly about it either way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82911/new/
https://reviews.llvm.org/D82911
More information about the llvm-commits
mailing list