llvm-6502/test
Evan Cheng 8a7186dbc2 Let targets provide hooks that compute known zero and ones for any_extend
and extload's. If they are implemented as zero-extend, or implicitly
zero-extend, then this can enable more demanded bits optimizations. e.g.

define void @foo(i16* %ptr, i32 %a) nounwind {
entry:
  %tmp1 = icmp ult i32 %a, 100
  br i1 %tmp1, label %bb1, label %bb2
bb1:
  %tmp2 = load i16* %ptr, align 2
  br label %bb2
bb2:
  %tmp3 = phi i16 [ 0, %entry ], [ %tmp2, %bb1 ]
  %cmp = icmp ult i16 %tmp3, 24
  br i1 %cmp, label %bb3, label %exit
bb3:
  call void @bar() nounwind
  br label %exit
exit:
  ret void
}

This compiles to the followings before:
        push    {lr}
        mov     r2, #0
        cmp     r1, #99
        bhi     LBB0_2
@ BB#1:                                 @ %bb1
        ldrh    r2, [r0]
LBB0_2:                                 @ %bb2
        uxth    r0, r2
        cmp     r0, #23
        bhi     LBB0_4
@ BB#3:                                 @ %bb3
        bl      _bar
LBB0_4:                                 @ %exit
        pop     {lr}
        bx      lr

The uxth is not needed since ldrh implicitly zero-extend the high bits. With
this change it's eliminated.

rdar://12771555


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169459 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-06 01:28:01 +00:00
..
Analysis Cost Model: change the default cost of control flow instructions (br / ret / ...) to zero. 2012-12-05 21:21:26 +00:00
Archive
Assembler Fast-math test case for bitcode and textual reading/writing 2012-11-27 00:45:08 +00:00
Bindings/Ocaml
Bitcode
BugPoint
CodeGen Let targets provide hooks that compute known zero and ones for any_extend 2012-12-06 01:28:01 +00:00
DebugInfo Use the 'count' attribute to calculate the upper bound of an array. 2012-12-04 21:34:03 +00:00
ExecutionEngine
Feature Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
FileCheck Fix a bug in FileCheck that wouldn't let define variables as follows: 2012-12-02 16:02:41 +00:00
Instrumentation [msan] Instrument bswap intrinsic. 2012-12-05 14:39:55 +00:00
Integer Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
JitListener Use the 'count' attribute to calculate the upper bound of an array. 2012-12-04 21:34:03 +00:00
Linker Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
MC Correct ARM NOP encoding 2012-12-05 21:01:27 +00:00
Object
Other
Scripts
TableGen
tools PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test! 2012-12-05 23:15:33 +00:00
Transforms fix a typo 2012-12-05 00:33:16 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
lit.cfg Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
lit.site.cfg.in Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
Makefile
Makefile.tests
TestRunner.sh