[PATCH] D118602: [CodeGenPrepare] Avoid out-of-bounds shift

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 3 08:46:20 PST 2022


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

In D118602#3293833 <https://reviews.llvm.org/D118602#3293833>, @bjope wrote:

> Yes, that is another option. I kind of copied how this was dealt with on line 6491 (another place where CGP is analyzing Shl), but bailing out when finding an OOB shift amount seems safe here. Is that preferred?

I don't think it makes a difference either way. Since there's precedence for this code pattern, LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118602



More information about the llvm-commits mailing list