LLVM backend for 6502
Go to file
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
autoconf Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
bindings [python] Add negative MemoryBuffer testcase 2012-03-22 11:23:52 +00:00
cmake LLVMProcessSources.cmake: [MSVC] Don't add "PROPERTIES HEADER_FILE_ONLY" to *.def. 2012-06-24 03:50:58 +00:00
docs Sphyinxify the Bugpoint document. 2012-06-26 11:37:00 +00:00
examples Remove trailing whitespaces 2012-06-21 22:26:01 +00:00
include X86: add GATHER intrinsics (AVX2) in LLVM 2012-06-26 19:47:59 +00:00
lib Remove a instcombine transform that (no longer?) makes sense: 2012-06-26 22:03:13 +00:00
projects Add mipsel-* to the list of targets recognized by configure script. 2012-06-18 19:06:25 +00:00
runtime Free the allocated filename. Found by clang static analyzer. 2012-06-15 09:11:47 +00:00
test Remove a instcombine transform that (no longer?) makes sense: 2012-06-26 22:03:13 +00:00
tools Fix llc's -print-before=pass and -print-after=pass. 2012-06-26 21:33:36 +00:00
unittests IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL with NOT_A_NUMBER constant (0xffff). 2012-06-26 16:08:20 +00:00
utils X86: add GATHER intrinsics (AVX2) in LLVM 2012-06-26 19:47:59 +00:00
.gitignore Add tools/lld to .gitignore. 2012-05-02 21:25:32 +00:00
CMakeLists.txt New test tool: obj2yaml 2012-06-19 18:02:35 +00:00
configure Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
CREDITS.TXT Alphabetize. 2012-06-19 23:47:58 +00:00
LICENSE.TXT Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
llvm.spec.in Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00
LLVMBuild.txt
Makefile Do not install llvm-config-host for cross-builds of clang. rdar://11317847 2012-05-09 00:07:02 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in - Added ExecutionEngine/MCJIT tests 2012-05-17 21:07:47 +00:00
Makefile.rules llvm-ld does not exist anymore, use llvm-link instead. 2012-05-23 20:34:19 +00:00
README.txt Testing commit access 2012-05-24 14:20:13 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.