diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-29 10:55:55 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-29 21:59:39 +0200 |
commit | a5be86fde5de2c253aa19704bf4e4854f1936f8c (patch) | |
tree | 59281b8494b772a1ec496f4ef584445d9af2354f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 5067f4b6261c07d5df94bf18407235d83ce33861 (diff) | |
download | llvm-a5be86fde5de2c253aa19704bf4e4854f1936f8c.zip llvm-a5be86fde5de2c253aa19704bf4e4854f1936f8c.tar.gz llvm-a5be86fde5de2c253aa19704bf4e4854f1936f8c.tar.bz2 |
[InstSimplify] Protect against more poison in SimplifyWithOpReplaced (PR47322)
Replace the check for poison-producing instructions in
SimplifyWithOpReplaced() with the generic helper canCreatePoison()
that properly handles poisonous shifts and thus avoids the problem
from PR47322.
This additionally fixes a bug in IIQ.UseInstrInfo=false mode, which
previously could have caused this code to ignore poison flags.
Setting UseInstrInfo=false should reduce the possible optimizations,
not increase them.
This is not a full solution to the problem, as poison could be
introduced more indirectly. This is just a minimal, easy to backport
fix.
Differential Revision: https://reviews.llvm.org/D86834
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions