llvm-6502/test/Transforms
Hal Finkel b19dd2bcaf Revert r185257 (InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms)
I'm reverting this commit because:

 1. As discussed during review, it needs to be rewritten (to avoid creating and
then deleting instructions).

 2. This is causing optimizer crashes. Specifically, I'm seeing things like
this:

    While deleting: i1 %
    Use still stuck around after Def is destroyed:  <badref> = select i1 <badref>, i32 0, i32 1
    opt: /src/llvm-trunk/lib/IR/Value.cpp:79: virtual llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed.

   I'd guess that these will go away once we're no longer creating/deleting
instructions here, but just in case, I'm adding a regression test.

Because the code is bring rewritten, I've just XFAIL'd the original regression test. Original commit message:

	InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms

	Real world code sometimes has the denominator of a 'udiv' be a
	'select'.  LLVM can handle such cases but only when the 'select'
	operands are symmetric in structure (both select operands are a constant
	power of two or a left shift, etc.).  This falls apart if we are dealt a
	'udiv' where the code is not symetric or if the select operands lead us
	to more select instructions.

	Instead, we should treat the LHS and each select operand as a distinct
	divide operation and try to optimize them independently.  If we can
	to simplify each operation, then we can replace the 'udiv' with, say, a
	'lshr' that has a new select with a bunch of new operands for the
	select.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185415 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 05:21:11 +00:00
..
ADCE
ArgumentPromotion
BBVectorize
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp
CorrelatedValuePropagation
DeadArgElim DeadArgumentElimination: keep return value on functions that have a live argument with the 'returned' attribute (rather than generate invalid IR); however, if both can be eliminated, both will be 2013-06-30 20:26:21 +00:00
DeadStoreElimination
DebugIR Adding tests for DebugIR pass 2013-06-28 20:37:20 +00:00
EarlyCSE
FunctionAttrs
GCOVProfiling
GlobalDCE
GlobalOpt Always remove an alias when we rename the target. 2013-06-12 16:45:47 +00:00
GVN
IndVarSimplify IndVarSimplify: check if loop invariant expansion can trap 2013-06-04 17:51:58 +00:00
Inline
InstCombine Revert r185257 (InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms) 2013-07-02 05:21:11 +00:00
InstSimplify
Internalize
IPConstantProp
JumpThreading
LCSSA
LICM
LoopDeletion
LoopIdiom
LoopRotate
LoopSimplify
LoopStrengthReduce LSR: Fix the parameters used to compute the scaling factor cost. 2013-06-19 19:59:41 +00:00
LoopUnroll Prevent loop-unroll from making assumptions about undefined behavior. 2013-05-31 23:34:46 +00:00
LoopUnswitch
LoopVectorize LoopVectorize: Math functions only read rounding mode 2013-07-01 00:54:44 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt Fix a potential bug in r183584. 2013-06-08 04:56:05 +00:00
MergeFunc
MetaRenamer
ObjCARC [objc-arc] Ensure that the cfg path count does not overflow when we multiply TopDownPathCount/BottomUpPathCount. 2013-06-07 06:16:49 +00:00
PhaseOrdering
PruneEH
Reassociate
Reg2Mem
ScalarRepl Fix SROA to avoid unnecessary scalar conversions for 1-element vectors. 2013-06-25 19:09:50 +00:00
SCCP
SimplifyCFG Second part of pr16069 2013-06-04 14:11:59 +00:00
Sink
SLPVectorizer SLP Vectorizer: Add support for trees with external users. 2013-06-28 22:07:09 +00:00
SROA
StripSymbols
StructurizeCFG Move StructurizeCFG out of R600 to generic Transforms. 2013-06-19 20:18:24 +00:00
TailCallElim
TailDup