[PATCH] D71481: [PowerPC][NFC] Refactor splat of constant to vector.
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 12:07:33 PST 2019
stefanp accepted this revision as: stefanp.
stefanp added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: wuzish.
It took me a while to determine that this was in fact NFC.
Removing the whole:
if (HasAnyUndefs || ISD::isBuildVectorAllOnes(BVN)) {
...
}
threw me off.
I'm convinced now so I'll approve it.
The minor nit that I have can be done on commit.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8600
+ if (Subtarget.hasP9Vector() && SplatSize == 1)
+ return BuildSplatI(SplatBits, SplatSize, Op.getValueType(), DAG, dl);
----------------
nit:
I would like a comment here to explain that even though we are passing `SplatBits` which is `unsigned` to a function that takes a signed `int` for that parameter (and then that function checks to see if that value is -1 at one point) it is fine because we are only doing this for `SplatSize == 1` and so we know that we are only working with 8 bits that have been zero extended.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71481/new/
https://reviews.llvm.org/D71481
More information about the llvm-commits
mailing list