[PATCH] D134684: [LegalizeTypes][Mips][RISCV][SystemZ] Mask shift amounts in ExpandShiftWithUnknownAmountBit.

Amanieu d'Antras via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 13:40:40 PDT 2022


Amanieu added a comment.

Note that the case in PR57988 doesn't involve any out-of-range shifts in the source program. The current codegen means that with (1i128 << 0) you end up calling __ashldi with a shift amount of -64. If that's something we're happy with then the documentation should be fixed and I can go update Rust's compiler-builtins to wrap instead of panicking on out-of-range shifts in debug builds (which is how this bug was discovered).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134684



More information about the llvm-commits mailing list