[all-commits] [llvm/llvm-project] ebb2e5: [GlobalISel][Mips] Correct corner case in G_UADDE ...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Aug 17 15:13:16 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ebb2e5ebb2a669824499fc074d948cd28a831151
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/test/CodeGen/Mips/GlobalISel/legalizer/add.mir
    M llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/add.ll

  Log Message:
  [GlobalISel][Mips] Correct corner case in G_UADDE legalization.

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.
But there should be a carry out since carryin+RHS wraps around to 0.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D157943

More information about the All-commits mailing list