hanchenye-llvm-project/llvm/test/Transforms/SimplifyCFG
Sanjay Patel a932da8f35 Fix for PR17073 ( http://llvm.org/pr17073 ), simplifycfg illegally hoists an operation in a phi node that can trap.
This patch adds to an existing loop over phi nodes in SimplifyCondBranchToCondBranch() to check for trapping ops and bails out of the optimization if we find one of those.

The test cases verify that trapping ops are not hoisted and non-trapping ops are still optimized as expected.

llvm-svn: 212490
2014-07-07 21:19:00 +00:00
..
SPARC Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
X86 Don't build switch tables for dllimport and TLS variables in GEPs 2014-06-26 00:30:52 +00:00
2002-05-21-PHIElimination.ll
2002-09-24-PHIAssertion.ll
2003-03-07-DominateProblem.ll
2003-08-05-InvokeCrash.ll
2003-08-17-BranchFold.ll
2003-08-17-BranchFoldOrdering.ll
2003-08-17-FoldSwitch-dbg.ll
2003-08-17-FoldSwitch.ll
2004-12-10-SimplifyCFGCrash.ll
2005-06-16-PHICrash.ll
2005-08-01-PHIUpdateFail.ll
2005-10-02-InvokeSimplify.ll
2005-12-03-IncorrectPHIFold.ll
2006-02-17-InfiniteUnroll.ll
2006-06-12-InfLoop.ll
2006-08-03-Crash.ll
2006-10-19-UncondDiv.ll
2006-12-08-Ptr-ICmp-Branch.ll
2007-11-22-InvokeNoUnwind.ll
2007-12-21-Crash.ll
2008-01-02-hoist-fp-add.ll
2008-05-16-PHIBlockMerge.ll
2008-07-13-InfLoopMiscompile.ll
2008-09-08-MultiplePred.ll
2008-09-17-SpeculativeHoist.ll
2008-10-03-SpeculativelyExecuteBeforePHI.ll
2008-12-06-SingleEntryPhi.ll
2008-12-16-DCECond.ll
2009-01-18-PHIPropCrash.ll
2009-01-19-UnconditionalTrappingConstantExpr.ll
2009-05-12-externweak.ll
2010-03-30-InvokeCrash.ll
2011-03-08-UnreachableUse.ll
2011-09-05-TrivialLPad.ll
BrUnwind.ll
CoveredLookupTable.ll Teach simplify-cfg how to correctly create covered lookup tables for switches on iN with N >= 3. 2013-10-20 07:04:37 +00:00
DeadSetCC.ll
EmptyBlockMerge.ll
EqualPHIEdgeBlockMerge.ll
ForwardSwitchConditionToPHI.ll
HoistCode.ll
MagicPointer.ll Teach SimplifyCFG about address spaces 2013-10-21 18:55:08 +00:00
PHINode.ll
PR9946.ll
PR16069.ll
PR17073.ll Fix for PR17073 ( http://llvm.org/pr17073 ), simplifycfg illegally hoists an operation in a phi node that can trap. 2014-07-07 21:19:00 +00:00
PhiBlockMerge.ll
PhiBlockMerge2.ll
PhiEliminate.ll
PhiEliminate2.ll
PhiEliminate3.ll
PhiNoEliminate.ll
SpeculativeExec.ll
UncondBranchToReturn.ll
UnreachableEliminate.ll
attr-noduplicate.ll SimplifyCFG: Don't duplicate calls to functions marked noduplicate v2 2013-10-21 20:07:30 +00:00
basictest.ll Fix pr14893. 2014-01-28 16:56:46 +00:00
branch-cond-merge.ll
branch-cond-prop.ll
branch-fold-dbg.ll Debug Info Testing: updated to use NULL instead of "i32 0" in a few fields. 2013-09-06 21:03:58 +00:00
branch-fold-test.ll
branch-fold.ll
branch-phi-thread.ll
common-dest-folding.ll FoldBranchToCommonDest merges branches into a single branch with or/and of the condition. It has a heuristics for estimating when some of the dependencies are processed by out-of-order processors. This patch adds another rule to the heuristics that says that if the "BonusInstruction" that we speculatively execute is used by the condition of the second branch then it is okay to hoist it. This change exposes more opportunities for other passes to transform the code. It does not matter that much that we if-convert the code because the selectiondag builder splits or/and branches into multiple branches when profitable. 2013-11-12 22:37:16 +00:00
dbginfo.ll
dce-cond-after-folding-terminator.ll
duplicate-phis.ll
extract-cost.ll Add ExtractValue instruction to SimplifyCFG's ComputeSpeculationCost 2014-05-09 17:02:46 +00:00
hoist-common-code.ll
hoist-dbgvalue.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-23 01:16:29 +00:00
indirectbr.ll
invoke.ll
invoke_unwind.ll
iterative-simplify.ll
lifetime.ll
multiple-phis.ll
no_speculative_loads_with_tsan.ll Don't speculate loads under ThreadSanitizer 2013-11-21 07:29:28 +00:00
noreturn-call.ll
phi-undef-loadstore.ll
preserve-branchweights-partial.ll
preserve-branchweights-switch-create.ll
preserve-branchweights.ll PGO branch weight: keep halving the weights until they can fit into 2014-01-27 23:39:03 +00:00
return-merge.ll
select-gep.ll
sink-common-code.ll
speculate-math.ll Allow speculating llvm.sqrt, fma and fmuladd 2014-01-31 00:09:00 +00:00
speculate-store.ll
speculate-vector-ops.ll Make bitcast, extractelement, and insertelement considered cheap for speculation. 2014-05-30 18:34:43 +00:00
speculate-with-offset.ll
switch-masked-bits.ll
switch-on-const-select.ll
switch-simplify-crash.ll
switch-to-icmp.ll
switch_create.ll Resolve TODO in test now that filecheck has multiple check prefixes. 2013-11-10 02:16:47 +00:00
switch_switch_fold.ll
switch_thread.ll
trap-debugloc.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
trapping-load-unreachable.ll IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
trivial-throw.ll
two-entry-phi-return.ll
unreachable-blocks.ll
volatile-phioper.ll