[PATCH] D99481: [InstCombine] Fix miscompile on GEP+load to icmp fold (PR45210)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 31 18:37:25 PDT 2021


efriedma added a comment.

Oh, hmm, didn't realize the transform could still fail at that point.  Need to fix the code to avoid creating the mask instruction if the transform fails.  @nathanchance, feel free to revert in the meantime.

On a side-note, looking at the code more closely, probably should check if Idx is too narrow, so we don't accidentally mask the high bits of the array indexes.  Not sure if that happens in practice, though.  GEPs with indexes narrower than i16 don't usually show up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99481



More information about the llvm-commits mailing list