[PATCH] D120371: [instcombine] Generalize one-compare rule from foldAllocaCmp for noalias calls

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 22 17:04:50 PST 2022


reames created this revision.
reames added reviewers: nikic, anna, fhahn.
Herald added subscribers: jeroen.dobbelaere, bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

This change generalizes the handling for a potentially capturing comparison of an unescaped alloca to handle noalias calls as well.  In the process, it also generalizes the existing alloca handling to reuse the generic capture tracking logic.

Doing this requires reverting 43d7e1c at the same time, and thus fixing https://github.com/llvm/llvm-project/issues/54002.  If we add nocapture argument support without reverting that change, we take a currently mostly silent miscompile and risk increasing it's frequency.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120371

Files:
  llvm/lib/Analysis/CaptureTracking.cpp
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120371.410678.patch
Type: text/x-patch
Size: 9906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220223/8cac3189/attachment.bin>


More information about the llvm-commits mailing list