[PATCH] D66150: GlobalISel: Don't create G_UADDE with constant false carry in
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 09:55:31 PDT 2019
arsenm marked an inline comment as done.
arsenm added inline comments.
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:665-674
for (int i = 0; i < NumParts; ++i) {
Register DstReg = MRI.createGenericVirtualRegister(NarrowTy);
Register CarryOut = MRI.createGenericVirtualRegister(LLT::scalar(1));
- MIRBuilder.buildUAdde(DstReg, CarryOut, Src1Regs[i],
- Src2Regs[i], CarryIn);
+ if (i == 0)
+ MIRBuilder.buildUAddo(DstReg, CarryOut, Src1Regs[i], Src2Regs[i]);
+ else {
----------------
paquette wrote:
> You can just pull the `i == 0` case out of the loop and start the loop at 1.
This requires slightly more code since the createGenericVirtualRegister calls need to be duplicated
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66150/new/
https://reviews.llvm.org/D66150
More information about the llvm-commits
mailing list