llvm-6502/test/Transforms
Shuxin Yang a1444219b2 1. Hoist minus sign as high as possible in an attempt to reveal
some optimization opportunities (in the enclosing supper-expressions).

   rule 1. (-0.0 - X ) * Y => -0.0 - (X * Y)
     if expression "-0.0 - X" has only one reference.

   rule 2. (0.0 - X ) * Y => -0.0 - (X * Y)
     if expression "0.0 - X" has only one reference, and
        the instruction is marked "noSignedZero".

2. Eliminate negation (The compiler was already able to handle these
    opt if the 0.0s are replaced with -0.0.)

   rule 3: (0.0 - X) * (0.0 - Y) => X * Y
   rule 4: (0.0 - X) * C => X * -C
   if the expr is flagged "noSignedZero".

3. 
  Rule 5: (X*Y) * X => (X*X) * Y
   if X!=Y and the expression is flagged with "UnsafeAlgebra".

   The purpose of this transformation is two-fold:
    a) to form a power expression (of X).
    b) potentially shorten the critical path: After transformation, the
       latency of the instruction Y is amortized by the expression of X*X,
       and therefore Y is in a "less critical" position compared to what it
      was before the transformation. 

4. Remove the InstCombine code about simplifiying "X * select".
   
   The reasons are following:
    a) The "select" is somewhat architecture-dependent, therefore the
       higher level optimizers are not able to precisely predict if
       the simplification really yields any performance improvement
       or not.

    b) The "select" operator is bit complicate, and tends to obscure
       optimization opportunities. It is btter to keep it as low as
       possible in expr tree, and let CodeGen to tackle the optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-15 21:09:32 +00:00
..
ADCE
ArgumentPromotion Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
BBVectorize Switch BBVectorize to directly depend on having a TTI analysis. 2013-01-07 10:22:36 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
ConstantMerge Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
ConstProp llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware. 2012-11-08 20:34:25 +00:00
CorrelatedValuePropagation CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the it's the condition of a SwitchInst, reload it. 2012-09-28 10:42:50 +00:00
DeadArgElim Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
DeadStoreElimination Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
EarlyCSE There was a switch fall-through in the parser for textual LLVM that caused 2013-01-07 13:32:38 +00:00
FunctionAttrs
GlobalDCE
GlobalOpt Fix TryToShrinkGlobalToBoolean in GlobalOpt, so that it does not discard address spaces. 2013-01-10 10:31:11 +00:00
GVN Memory Dependence Analysis: fix a miscompile that uses DT to approxmiate the 2013-01-04 19:19:47 +00:00
IndVarSimplify Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
Inline Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 14:04:36 +00:00
InstCombine 1. Hoist minus sign as high as possible in an attempt to reveal 2013-01-15 21:09:32 +00:00
InstSimplify Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
Internalize Change the internalize pass to internalize all symbols when given an empty 2012-10-26 18:47:48 +00:00
IPConstantProp
JumpThreading Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
LCSSA
LICM LICM: Hoist insertvalue/extractvalue out of loops. 2013-01-09 18:12:03 +00:00
LoopDeletion Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
LoopIdiom PR14904: Segmentation fault running pass 'Recognize loop idioms' 2013-01-10 23:32:01 +00:00
LoopRotate Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
LoopSimplify
LoopStrengthReduce Pattern-matched variables in post-inc-icmpzero.ll 2013-01-15 15:22:45 +00:00
LoopUnroll Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. 2012-12-20 16:04:27 +00:00
LoopUnswitch Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
LoopVectorize Fix PR14547. Handle induction variables of small sizes smaller than i32 (i8 and i16). 2013-01-13 07:56:29 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt In my recent change to avoid use of underaligned memory I didn't notice that 2012-10-04 13:53:21 +00:00
MergeFunc CastInst::castIsValid should return true if the dest type is the same as 2013-01-10 23:22:53 +00:00
MetaRenamer Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
ObjCARC Added bugzilla PR number to test case. 2013-01-13 22:17:22 +00:00
PhaseOrdering Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
PruneEH The normal edge of an invoke is not allowed to branch to a block with a 2012-08-10 20:55:20 +00:00
Reassociate Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
Reg2Mem Make sure we don't emit instructions before a landingpad instruction. 2013-01-08 10:51:32 +00:00
ScalarRepl Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
SCCP Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
SimplifyCFG Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
SimplifyLibCalls Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
Sink
SROA Rename the test so that we can add additional vectors-of-pointers tests 2012-12-18 05:50:54 +00:00
StripSymbols Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
TailCallElim Converted test dont-tce-tail-marked-call.ll to use FileCheck. 2013-01-11 04:16:35 +00:00
TailDup Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00