If carryin was 1, and RHS is 0xffffffff we were not giving a carry
out.
In that case Res would be equal to LHS, so Res <u LHS would be false.
But there should be a carry out since carryin+RHS wraps around to 0.
Paths
| Differential D157943
[GlobalISel][Mips] Correct corner case in G_UADDE legalization. ClosedPublic Authored by craig.topper on Aug 14 2023, 6:30 PM.
Details Summary If carryin was 1, and RHS is 0xffffffff we were not giving a carry In that case Res would be equal to LHS, so Res <u LHS would be false.
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Aug 17 2023, 1:26 PM This revision was landed with ongoing or failed builds.Aug 17 2023, 3:13 PM Closed by commit rGebb2e5ebb2a6: [GlobalISel][Mips] Correct corner case in G_UADDE legalization. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 551291 llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/Mips/GlobalISel/legalizer/add.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/add.ll
|
Should probably use an and here, that's more canonical for booleans plus that seems to be what the DAG does