[all-commits] [llvm/llvm-project] 697a28: [CodeGenPrepare][RISCV] Correct the MathUsed flag ...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Mar 27 10:01:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 697a28b380753c754a534ab92b376357a3839e3f
      https://github.com/llvm/llvm-project/commit/697a28b380753c754a534ab92b376357a3839e3f
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/test/CodeGen/RISCV/overflow-intrinsics.ll

  Log Message:
  -----------
  [CodeGenPrepare][RISCV] Correct the MathUsed flag for shouldFormOverflowOp

For add, if we match the constant edge case the add isn't used by
the compare so we shouldn't check for 2 users.

For sub, the compare is not a user of the sub so the math is
used if the sub has any users.

This regresses RISC-V which I will work on other patches for.

Reviewed By: RKSimon

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


  Commit: c9e4d9a8ea46e6106d248bdc99d8a07ae3ba5dc2
      https://github.com/llvm/llvm-project/commit/c9e4d9a8ea46e6106d248bdc99d8a07ae3ba5dc2
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/RISCV/overflow-intrinsics.ll

  Log Message:
  -----------
  [LegalizeTypes][TargetLowering][RISCV] Fix regressions from D146786.

Add some special cases for UADDO to recover codegen after D146786.

Reviewed By: reames, liaolucy

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


Compare: https://github.com/llvm/llvm-project/compare/9b957b12cc12...c9e4d9a8ea46


More information about the All-commits mailing list