Details
- Reviewers
nemanjai - Group Reviewers
Restricted Project - Commits
- rGa3b57bca97c0: [PowerPC] remove side effect for some cases for saturate instructions
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
15790–15822 | Can you please do the following two things:
switch (cast<ConstantSDNode>(N->getOperand(1))->getZExtValue()) { case Intrinsic::ppc_vsx_lxvw4x: case Intrinsic::ppc_vsx_lxvd2x: if (Subtarget.needsSwapsForVSXMemOps()) return expandVSXLoadForLE(N, DCI); break; case Intrinsic::ppc_altivec_vsum4sbs: case Intrinsic::ppc_altivec_vsum4shs: case Intrinsic::ppc_altivec_vsum4ubs: { // handle the chain replacement } } |
LGTM. I don't think that the test improvement requires another review.
llvm/test/CodeGen/PowerPC/vector-sum-sat-bit-side-effect.ll | ||
---|---|---|
12 | I think it would be more useful to add a use of the actual sum in at least one of the tests. The test would have one call that is used and one that is unused. Previous to this patch, we would emit both and with this patch, we only emit the one that is used. |
llvm/test/CodeGen/PowerPC/vector-sum-sat-bit-side-effect.ll | ||
---|---|---|
12 | Sure, I will add 3 new cases in the commit. And these cases will contains two calls, one call has user and one call has no user, so this call can be optimized by this patch. |
Can you please do the following two things: