llvm-6502/test
Evan Cheng bbbe413846 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159230 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 22:03:13 +00:00
..
Analysis
Archive
Assembler Extend the IL for selecting TLS models (PR9788) 2012-06-23 11:37:03 +00:00
Bindings/Ocaml
Bitcode Add AutoUpgrade support for the SSE4 ptest intrinsics. 2012-06-10 18:42:51 +00:00
BugPoint
CodeGen Fix llc's -print-before=pass and -print-after=pass. 2012-06-26 21:33:36 +00:00
DebugInfo Emit relocations for DW_AT_location entries on systems which need it. This is 2012-06-22 01:25:12 +00:00
ExecutionEngine Add Mips to the list of target architectures for the MCJIT tests. 2012-06-21 20:23:32 +00:00
Feature
Instrumentation
Integer
Linker
MC X86: add GATHER intrinsics (AVX2) in LLVM 2012-06-26 19:47:59 +00:00
Object Add relocation types for Hexagon processor; patch by Sidney Manning <sidneym@codeaurora.org> 2012-06-23 14:46:18 +00:00
Other
Scripts
TableGen
Transforms Remove a instcombine transform that (no longer?) makes sense: 2012-06-26 22:03:13 +00:00
Unit
Verifier revert r158660, since Chris has some issues with this patch (namely using code to reprent information only used by the compiler) 2012-06-18 23:34:26 +00:00
YAMLParser
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
site.exp.in
TestRunner.sh