[PATCH] D66150: GlobalISel: Don't create G_UADDE with constant false carry in
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 14:51:47 PDT 2019
paquette accepted this revision.
paquette added a comment.
This revision is now accepted and ready to land.
LGTM
================
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 {
----------------
You can just pull the `i == 0` case out of the loop and start the loop at 1.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66150/new/
https://reviews.llvm.org/D66150
More information about the llvm-commits
mailing list