Extend SimplifyCFG's common-destination folding heuristic to allow a single
authorOwen Anderson <resistor@mac.com>
Wed, 14 Jul 2010 19:52:16 +0000 (19:52 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 14 Jul 2010 19:52:16 +0000 (19:52 +0000)
commite84178a0bd3a218238b15ef646f2e740f3a48037
tree0112af403b30e3ebed1b7362b6efd9e682494c78
parent834480374ba38b2a31d6b63b492e442d75a462cf
Extend SimplifyCFG's common-destination folding heuristic to allow a single
"bonus" instruction to be speculatively executed.  Add a heuristic to
ensure we're not tripping up out-of-order execution by checking that this bonus
instruction only uses values that were already guaranteed to be available.

This allows us to eliminate the short circuit in (x&1)&&(x&2).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108351 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp