Go to file
Evan Cheng 5213139f48 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

llvm-svn: 169459
2012-12-06 01:28:01 +00:00
clang Disable clang/test/Preprocessor/macro-multiline.c for now, while investigating lit.ShUtil.parser. 2012-12-06 01:09:31 +00:00
clang-tools-extra Basic clang-format vim-integration. 2012-12-05 21:06:08 +00:00
compiler-rt [asan] drop the extension from asan tests (as the extension may be different) 2012-12-05 17:56:54 +00:00
debuginfo-tests XTARGET was removed, update debug-info tests. 2012-10-20 01:38:50 +00:00
libclc Fix build against recent versions of Clang. Based on patch by Alastair Donaldson! 2012-12-05 07:39:02 +00:00
libcxx [CMake] Add support for selecting which c++ abi library to use. 2012-11-30 21:02:29 +00:00
libcxxabi Rename class __lambda_node to ___lambda_node to fix compile failure with gcc 4.6 and 4.7 2012-12-05 18:55:49 +00:00
lld Add library dependencies to the lld cmake build. 2012-12-04 21:09:04 +00:00
lldb Move isprint8() into lldb_private as per post-commit review from Stefanus 2012-12-06 00:10:37 +00:00
llvm Let targets provide hooks that compute known zero and ones for any_extend 2012-12-06 01:28:01 +00:00
polly User isl sha commit id instead of the git tag 2012-12-04 21:54:37 +00:00