1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Transforms
Evan Cheng 9132bcf0e3 Remove a instcombine transform that (no longer?) makes sense:
// C - zext(bool) -> bool ? C - 1 : C
    if (ZExtInst *ZI = dyn_cast<ZExtInst>(Op1))
      if (ZI->getSrcTy()->isIntegerTy(1))
        return SelectInst::Create(ZI->getOperand(0), SubOne(C), C);

This ends up forming sext i1 instructions that codegen to terrible code. e.g.
int blah(_Bool x, _Bool y) {
  return (x - y) + 1;
}
=>
        movzbl  %dil, %eax
        movzbl  %sil, %ecx
        shll    $31, %ecx
        sarl    $31, %ecx
        leal    1(%rax,%rcx), %eax
        ret


Without the rule, llvm now generates:
        movzbl  %sil, %ecx
        movzbl  %dil, %eax
        incl    %eax
        subl    %ecx, %eax
        ret

It also helps with ARM (and pretty much any target that doesn't have a sext i1 :-).

The transformation was done as part of Eli's r75531. He has given the ok to
remove it.

rdar://11748024

llvm-svn: 159230
2012-06-26 22:03:13 +00:00
..
ADCE
ArgumentPromotion
BBVectorize Allow controlling vectorization of boolean values separately from other integer types. 2012-06-24 13:28:01 +00:00
BlockPlacement
BoundsChecking port the BoundsChecking patch to the new MemoryBuiltin API (i.e., remove most of the code from here). 2012-06-21 15:59:53 +00:00
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp
CorrelatedValuePropagation allow LazyValueInfo::getEdgeValue() to reason about multiple edges from the same switch instruction by doing union of ranges (which may still be conservative, but it's more aggressive than before) 2012-05-18 21:02:10 +00:00
DeadArgElim
DeadStoreElimination Teach DeadStoreElimination to eliminate exit-block stores with phi addresses. 2012-05-10 18:57:38 +00:00
EarlyCSE
FunctionAttrs
GlobalDCE
GlobalOpt If a constant or a function has linkonce_odr linkage and unnamed_addr, mark it 2012-06-25 14:30:31 +00:00
GVN When gvn decides to replace an instruction with another, we have to patch the 2012-06-04 22:44:21 +00:00
IndVarSimplify Teach SCEV's icmp simplification logic that a-b == 0 is equivalent to a == b. 2012-05-30 18:32:23 +00:00
Inline Fix the inliner so that the optsize function attribute don't alter the 2012-05-23 13:42:57 +00:00
InstCombine Remove a instcombine transform that (no longer?) makes sense: 2012-06-26 22:03:13 +00:00
InstSimplify Revert r153521 as it's causing large regressions on the nightly testers. 2012-03-28 18:42:50 +00:00
Internalize
IPConstantProp
JumpThreading formatting change: strip debug info from test 2012-05-10 16:55:31 +00:00
LCSSA Enable the new LoopInfo algorithm by default. 2012-06-26 04:11:38 +00:00
LICM An instruction in a loop is not guaranteed to be executed just because the loop 2012-05-01 04:03:01 +00:00
LoopDeletion
LoopIdiom
LoopRotate Fix ValueTracking to conclude that debug intrinsics are safe to 2012-04-07 19:22:18 +00:00
LoopSimplify LoopSimplify bug fix. Handle indirect loop back edges. 2012-03-20 21:24:52 +00:00
LoopStrengthReduce Unit test for LSR kind=Special fix: r158536. 2012-06-15 22:46:31 +00:00
LoopUnroll Fix 12513: Loop unrolling breaks with indirect branches. 2012-04-10 05:14:42 +00:00
LoopUnswitch Enable the new LoopInfo algorithm by default. 2012-06-26 04:11:38 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch PR1255 related changes (case ranges): 2012-05-24 09:33:20 +00:00
Mem2Reg
MemCpyOpt Move the capture analysis from MemoryDependencyAnalysis to a more general place 2012-05-14 20:35:04 +00:00
MergeFunc
ObjCARC Fix the objc_autoreleasedReturnValue optimization code to locate 2012-06-25 19:47:37 +00:00
PhaseOrdering Reapply r155136 after fixing PR12599. 2012-04-23 17:39:52 +00:00
PruneEH
Reassociate Remove a dangling reference to a deleted instruction. Fixes PR13185! 2012-06-24 01:44:08 +00:00
ScalarRepl Now that SROA can form alloca's for dynamic vector accesses, further improve it to be able to replace operations on these vector alloca's with insert/extract element insts 2012-06-17 03:58:26 +00:00
SCCP Reapply r155682, making constant folding more consistent, with a fix to work 2012-04-27 17:50:22 +00:00
SimplifyCFG improve optimization of invoke instructions: 2012-06-25 17:11:47 +00:00
SimplifyLibCalls revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok to mark realloc as noalias 2012-06-25 23:26:10 +00:00
Sink Enhance the sinking code to handle diamond patterns. Patch by 2012-05-31 08:09:49 +00:00
StripSymbols
TailCallElim
TailDup Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00