[PATCH] D86000: Add an unsigned shift base sanitizer

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 14 23:27:17 PDT 2020


lebedev.ri added a comment.

What's next, a sanitizer that input to signed right-shift is always non-negative? :)

FWIW "fixing" these "bugs" via `(x & ~(~1U << (32-shamt))) << shamt` is going to be fine,
i've already taught instcombine to drop such pointless masking before left-shift
in PR42563 <https://bugs.llvm.org/show_bug.cgi?id=42563>: https://godbolt.org/z/1h33hP


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86000



More information about the cfe-commits mailing list