1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib/Transforms
David Majnemer aa3c1f7077 [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
2015-06-06 02:30:43 +00:00
..
Hello
InstCombine [InstCombine] Don't miscompile select to poison 2015-06-06 02:30:43 +00:00
Instrumentation Tidy code in InstrProfiling.cpp. NFC. 2015-06-04 11:45:32 +00:00
IPO [PM/AA] Start refactoring AliasAnalysis to remove the analysis group and 2015-06-04 02:03:15 +00:00
ObjCARC [PM/AA] Start refactoring AliasAnalysis to remove the analysis group and 2015-06-04 02:03:15 +00:00
Scalar [Unroll] Rework the naming and structure of the new unroll heuristics. 2015-06-05 17:01:43 +00:00
Utils [LoopVectorize] Don't crash on zero-sized types in isInductionPHI 2015-06-05 10:52:40 +00:00
Vectorize [PM/AA] Start refactoring AliasAnalysis to remove the analysis group and 2015-06-04 02:03:15 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile