[PATCH] D84792: [InstSimplify/NewGVN] Add option to control the use of undef.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 13:04:35 PDT 2020


fhahn created this revision.
fhahn added reviewers: davide, efriedma, nikic, lebedev.ri, aqjune, spatel.
Herald added subscribers: hiraditya, Prazek.
Herald added a project: LLVM.
fhahn requested review of this revision.

Making use of undef is not safe if the simplification result is not used
to replace all uses of the result. This leads to problems in NewGVN,
which does not replace all uses in the IR directly. See PR33165 for more
details.

This patch adds an option to SimplifyQuery to disable the use of undef.

Note that I've only guarded uses if isa<UndefValue>/m_Undef where
SimplifyQuery is currently available. If we agree on the general
direction, I'll update the remaining uses.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84792

Files:
  llvm/include/llvm/Analysis/InstructionSimplify.h
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Transforms/Scalar/NewGVN.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84792.281337.patch
Type: text/x-patch
Size: 10975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200728/87da0d29/attachment.bin>


More information about the llvm-commits mailing list