Refactor the splatting of a constant to a vector so that common code is used both for Power9 and Power8.
Details
Details
- Reviewers
hfinkel stefanp - Group Reviewers
Restricted Project - Commits
- rGec3d6f3ecb4e: [PowerPC][NFC] Refactor splat of constant to vector.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
8642 | nit: |
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.