[llvm-commits] [llvm] r109448 - /llvm/trunk/lib/Target/ARM/README.txt

Bill Wendling wendling at apple.com
Mon Jul 26 15:38:27 PDT 2010


On Jul 26, 2010, at 2:48 PM, Anton Korobeynikov wrote:

> Author: asl
> Date: Mon Jul 26 16:48:35 2010
> New Revision: 109448
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=109448&view=rev
> Log:
> Add a note
> 
> Modified:
>    llvm/trunk/lib/Target/ARM/README.txt
> 
> Modified: llvm/trunk/lib/Target/ARM/README.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/README.txt?rev=109448&r1=109447&r2=109448&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/README.txt (original)
> +++ llvm/trunk/lib/Target/ARM/README.txt Mon Jul 26 16:48:35 2010
> @@ -636,3 +636,24 @@
> version.
> 
> //===---------------------------------------------------------------------===//
> +
> +Consider the following simple C code:
> +
> +void foo(unsigned char *a, unsigned char *b, int *c) {
> + if ((*a | *b) == 0) *c = 0;
> +}
> +
> +currently llvm-gcc generates something like this (nice branchless code I'd say):
> +
> +       ldrb    r0, [r0]

Hi Anton,

Unprintable characters perhaps? :)

-bw

> +       ldrb    r1, [r1]
> +       orr     r0, r1, r0
> +       tst     r0, #255
> +       moveq   r0, #0
> +       streq   r0, [r2]
> +       bx      lr
> +
> +Note that both "tst" and "moveq" are redundant.
> +
> +//===---------------------------------------------------------------------===//
> +
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list