diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-06-06 02:30:43 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-06-06 02:30:43 +0000 |
| commit | 468f6700218afd39c932e71a83786215930d5a77 (patch) | |
| tree | 8005d1e133434b30e052c934fda526db3a3489a1 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | f3d49b30b5abd0569420f5847bda2343c55a9186 (diff) | |
[InstCombine] Don't miscompile select to poison
If we have (select a, b, c), it is sometimes valid to simplify this to a
single select operand. However, doing so is only valid if the
computation doesn't inject poison into the computation.
It might be helpful to consider the following example:
(select (icmp ne %i, INT_MAX), (add nsw %i, 1), INT_MIN)
The select is equivalent to (add %i, 1) but not (add nsw %i, 1).
Self hosting on x86_64 revealed that this occurs very, very rarely so
bailing out is hopefully pretty reasonable.
llvm-svn: 239215
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
