[PATCH] D150177: [RISCV] Enable signed truncation check transforms for i8

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 15:30:41 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/signed-truncation-check.ll:468
   %tmp0 = add i64 %x, -128 ; ~0U << (8-1)
   %tmp1 = icmp uge i64 %tmp0, -256 ; ~0U << 8
   ret i1 %tmp1
----------------
craig.topper wrote:
> This IR is non-canonical. We shouldn't get a uge with constant from InstCombine. I'll add more tests.
Nevermind. I think the add_ultcmp_i64_i8 later in the file is the canonical form for this case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150177/new/

https://reviews.llvm.org/D150177



More information about the llvm-commits mailing list