llvm-6502/test/Transforms/SimplifyCFG
Eli Friedman 12bb766ae9 Fix for PR3016: detect the tricky case, where there are
unfoldable references to a PHI node in the block being folded, and disable
the transformation in that case.  The correct transformation of such PHI
nodes depends on whether BB dominates Succ, and dominance is expensive 
to compute here.  (Alternatively, it's possible to check whether any 
uses are live, but that's also essentially a dominance calculation. 
Another alternative is to use reg2mem, but it probably isn't a good idea to
use that in simplifycfg.)

Also, remove some incorrect code from CanPropagatePredecessorsForPHIs 
which is made unnecessary with this patch: it didn't consider the case 
where a PHI node in BB has multiple uses.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 04:23:49 +00:00
..
2002-05-05-EmptyBlockMerge.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2002-05-21-PHIElimination.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2002-06-24-PHINode.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2002-09-24-PHIAssertion.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2003-03-07-DominateProblem.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2003-08-05-InvokeCrash.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2003-08-05-MishandleInvoke.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2003-08-17-BranchFold.ll Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
2003-08-17-BranchFoldOrdering.ll Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
2003-08-17-FoldSwitch-dbg.ll Ignore dbg intrinsics while folding switch instruction. 2009-02-05 00:30:42 +00:00
2003-08-17-FoldSwitch.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2004-12-10-SimplifyCFGCrash.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2005-06-16-PHICrash.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2005-08-01-PHIUpdateFail.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2005-08-03-PHIFactorCrash.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2005-10-02-InvokeSimplify.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2005-12-03-IncorrectPHIFold.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2006-02-17-InfiniteUnroll.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2006-06-12-InfLoop.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2006-08-03-Crash.ll Remove GCSE and LoadVN from the testsuite. 2008-08-16 00:00:54 +00:00
2006-10-19-UncondDiv.ll convert this to an unfoldable potentially trapping constant expr. 2009-01-19 22:12:33 +00:00
2006-10-29-InvokeCrash.ll Split the Add, Sub, and Mul instruction opcodes into separate 2009-06-04 22:49:04 +00:00
2006-12-08-Ptr-ICmp-Branch.ll Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
2007-11-22-InvokeNoUnwind.ll Add some convenience methods for querying attributes, and 2007-11-28 17:07:01 +00:00
2007-12-21-Crash.ll Test -simplifycfg only. 2007-12-28 22:59:48 +00:00
2008-01-02-hoist-fp-add.ll Split the Add, Sub, and Mul instruction opcodes into separate 2009-06-04 22:49:04 +00:00
2008-04-23-MergeMultipleResultRet.ll Split some code out of the main SimplifyCFG loop into its own function. 2008-04-24 00:01:19 +00:00
2008-04-27-MultipleReturnCrash.ll Split the Add, Sub, and Mul instruction opcodes into separate 2009-06-04 22:49:04 +00:00
2008-05-16-PHIBlockMerge.ll Restucture a part of the SimplifyCFG pass and include a testcase. 2008-05-23 09:09:41 +00:00
2008-07-13-InfLoopMiscompile.ll Fix mishandling of the infinite loop case when merging two blocks. This 2008-07-13 22:23:11 +00:00
2008-09-08-MultiplePred.ll Fix simplifycfg crash in handing block merge. 2008-09-09 01:06:56 +00:00
2008-09-17-SpeculativeHoist.ll Do not hoist instruction above branch condition. The instruction may use branch condition. 2008-09-17 18:21:49 +00:00
2008-10-03-SpeculativelyExecuteBeforePHI.ll Nick Lewycky's patch. 2008-10-03 18:57:37 +00:00
2008-12-06-SingleEntryPhi.ll fix a bug I introduced in simplifycfg handling single entry phi 2008-12-07 07:22:45 +00:00
2008-12-16-DCECond.ll Add a helper to remove a branch and DCE the condition, and use it 2008-12-16 20:54:32 +00:00
2009-01-18-PHIPropCrash.ll Fix for PR3016: detect the tricky case, where there are 2009-08-16 04:23:49 +00:00
2009-01-19-UnconditionalTrappingConstantExpr.ll fix a testcase. 2009-01-22 07:08:58 +00:00
2009-03-05-Speculative-Hoist-Dbg.ll While hoisting instruction to speculatively execute simple bb, ignore dbg intrinsics. 2009-03-06 06:00:17 +00:00
2009-05-12-externweak.ll Split the Add, Sub, and Mul instruction opcodes into separate 2009-06-04 22:49:04 +00:00
2009-06-15-InvokeCrash.ll Fix the crash in this test. This is basically the same 2009-06-15 20:59:27 +00:00
basictest.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
branch_fold_dbg.ll Ignore dbg intrinsics. 2009-02-04 21:39:48 +00:00
branch-branch-dbginfo.ll Ignore dbg info intrinsics when folding conditional branch to 2009-02-26 06:56:37 +00:00
branch-cond-merge.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
branch-cond-prop.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
branch-fold-test.ll Fix run line. 2008-06-07 08:40:16 +00:00
branch-fold.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
branch-phi-thread.ll Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
BrUnwind.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
dbginfo.ll While folding unconditional return move DbgRegionEndInst into the predecessor, instead of removing it. This fixes following tests from llvmgcc42 testsuite. 2009-02-24 00:05:16 +00:00
DeadSetCC.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
dg.exp sabre brings to my attention that the 'tr' suffix is also obsolete 2008-05-20 21:00:03 +00:00
EqualPHIEdgeBlockMerge.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
hoist-common-code.dbg.ll Ignore dbg intrinsics while hoisting common code in the two blocks up into the branch block. 2009-02-04 00:03:08 +00:00
hoist-common-code.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
HoistCode.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
InvokeEliminate.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
iterative-simplify.ll Implement PR1786 by iterating between dead cycle elimination 2007-11-13 07:32:38 +00:00
noreturn-call.ll Implement PR1796 and Transforms/SimplifyCFG/noreturn-call.ll 2007-11-14 06:19:25 +00:00
PhiBlockMerge2.ll Make this test more challenging to help it avoid being 2008-03-11 21:47:57 +00:00
PhiBlockMerge.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
PhiEliminate2.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
PhiEliminate.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
PhiNoEliminate.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
return-merge.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
SpeculativeExec.ll Speculatively execute a block when the the block is the then part of a triangle shape and it contains a single, side effect free, cheap instruction. The branch is eliminated by adding a select instruction. i.e. 2008-06-07 08:52:29 +00:00
switch_create.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
switch_formation.dbg.ll While folding vallue comparison terminators ignore dbg intrinsics. 2009-02-04 01:06:11 +00:00
switch_formation.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
switch_switch_fold_dbginfo.ll Don't block basic block with only SwitchInst to fold into predecessors. 2009-02-25 15:34:27 +00:00
switch_switch_fold.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
switch_thread.ll Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
switch-simplify-crash.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
trapping-load-unreachable.ll Fix PR2967 by not deleting volatile load/stores that occur before unreachable. 2008-10-29 17:46:26 +00:00
two-entry-phi-return.dbg.ll Do not let dbg intrinsic block folding of two entry phi node. 2009-02-03 22:12:02 +00:00
two-entry-phi-return.ll Check to see if a two-entry PHI block can be simplified 2008-03-11 21:53:06 +00:00
UncondBranchToReturn.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00
UnreachableEliminate.ll Upgrade tests to not use llvm-upgrade. 2008-03-18 03:45:45 +00:00