llvm-6502/test
Bill Wendling 43a6c5e2fc We have a chance for an optimization. Consider this code:
int x(int t) {
  if (t & 256)
    return -26;
  return 0;
}

We generate this:

     tst.w   r0, #256
     mvn     r0, #25
     it      eq
     moveq   r0, #0

while gcc generates this:

     ands    r0, r0, #256
     it      ne
     mvnne   r0, #25
     bx      lr

Scandalous really!

During ISel time, we can look for this particular pattern. One where we have a
"MOVCC" that uses the flag off of a CMPZ that itself is comparing an AND
instruction to 0. Something like this (greatly simplified):

  %r0 = ISD::AND ...
  ARMISD::CMPZ %r0, 0         @ sets [CPSR]
  %r0 = ARMISD::MOVCC 0, -26  @ reads [CPSR]

All we have to do is convert the "ISD::AND" into an "ARM::ANDS" that sets [CPSR]
when it's zero. The zero value will all ready be in the %r0 register and we only
need to change it if the AND wasn't zero. Easy!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-31 22:41:22 +00:00
..
Analysis Fix constant-over-index.ll test on windows. 2010-08-30 15:08:02 +00:00
Archive
Assembler remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
Bindings/Ocaml Update ocaml test. 2010-08-28 10:29:41 +00:00
Bitcode Remove NEON vmovn intrinsic, replacing it with vector truncate operations. 2010-08-30 20:02:30 +00:00
BugPoint XFAIL this on mingw, following remove_arguments_test.ll. 2010-08-24 20:54:50 +00:00
CodeGen We have a chance for an optimization. Consider this code: 2010-08-31 22:41:22 +00:00
DebugInfo Convert DbgInfoPrinter to use errs() instead of outs(). 2010-08-20 18:03:05 +00:00
ExecutionEngine
Feature remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
FrontendAda
FrontendC no really, fix the test. 2010-08-27 23:05:54 +00:00
FrontendC++ Reapply r112623. Included additional check for unused byval argument. 2010-08-31 22:22:42 +00:00
FrontendFortran
FrontendObjC
FrontendObjC++ Test case for r110459. Radar 8264751. Test case by Fariborz Jahanian! 2010-08-06 19:02:24 +00:00
Integer
lib
Linker Reapply r112091 and r111922, support for metadata linking, with a 2010-08-26 15:41:53 +00:00
LLVMC Test: Fix LLVMC tests on CMake. 2010-08-30 14:49:00 +00:00
MC fixme accomplished 2010-08-28 20:40:28 +00:00
Other remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
Scripts coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4. 2010-08-30 15:19:56 +00:00
TableGen
Transforms Merge 2010-08-31-InfiniteRecursion.ll into crash.ll. 2010-08-31 20:27:17 +00:00
Unit
Verifier Reject unrepresentable pointer types in intrinsics. Fixes PR7316. 2010-08-08 06:12:09 +00:00
CMakeLists.txt Test: Fix LLVMC tests on CMake. 2010-08-30 14:49:00 +00:00
lit.cfg Test: Fix LLVMC tests on CMake. 2010-08-30 14:49:00 +00:00
lit.site.cfg.in
Makefile Partially revert r112480. Caused test failures. 2010-08-30 15:34:08 +00:00
Makefile.tests
site.exp.in
TestRunner.sh Use exec. 2010-08-29 14:49:00 +00:00