[PATCH] D157943: [GlobalISel][Mips] Correct corner case in G_UADDE legalization.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 11:55:34 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:3448
+ auto Res_ULT_LHS = MIRBuilder.buildICmp(CmpInst::ICMP_ULT, CondTy, Res, LHS);
+ MIRBuilder.buildSelect(CarryOut, Res_EQ_LHS, CarryIn, Res_ULT_LHS);
----------------
arsenm wrote:
> Should probably use an and here, that's more canonical for booleans plus that seems to be what the DAG does
Are you refering to the code in LegalizeDAG?
I based my implementation off what we get from ExpandIntRes for an ADD in SelectionDAG for RISC-V. That path creates a wide setcc ult that gets legalized to select like the one I used.
You can see this in `uaddo.i64` test case in test/CodeGen/RISCV/xaluo.ll for RV32.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157943/new/
https://reviews.llvm.org/D157943
More information about the llvm-commits
mailing list