[all-commits] [llvm/llvm-project] 0813b9: [TypePromotion] Support positive addition amounts ...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Mar 1 09:17:26 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0813b90ff5d195d8a40c280f6b745f1cc43e087a
      https://github.com/llvm/llvm-project/commit/0813b90ff5d195d8a40c280f6b745f1cc43e087a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M llvm/lib/CodeGen/TypePromotion.cpp
    M llvm/test/CodeGen/AArch64/and-mask-removal.ll
    M llvm/test/CodeGen/AArch64/signed-truncation-check.ll
    M llvm/test/CodeGen/AArch64/typepromotion-overflow.ll
    M llvm/test/CodeGen/RISCV/typepromotion-overflow.ll
    M llvm/test/Transforms/TypePromotion/ARM/icmps.ll
    M llvm/test/Transforms/TypePromotion/ARM/wrapping.ll

  Log Message:
  -----------
  [TypePromotion] Support positive addition amounts in isSafeWrap. (#81690)

We can support these by changing the sext promotion to -zext(-C) and
replacing a sgt check with ugt. Reframing the logic in terms of how the
unsigned range are affected. More comments in the patch.

The new cases check isLegalAddImmediate to avoid some
regressions in lit tests.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list