[LLVMdev] Simplifying selects + arm stuff
Evan Cheng
evan.cheng at apple.com
Fri Nov 12 12:02:21 PST 2010
On Nov 12, 2010, at 11:53 AM, Chris Lattner wrote:
>
> On Nov 12, 2010, at 11:46 AM, Evan Cheng wrote:
>
>>
>> This should be
>>
>> cmp r0, r1
>> movlt.w r2, #-1 @ or mvnlt r2, #0
>> and.w r0, r2, r3
>> bx lr
>>
>> which we gets right in Thumb2 mode (I need to check why it's not matching in ARM mode). How can we use a conditional and here? The result is either (y & -1) or (y & x), the "and" is not conditional.
>
> y&-1 == y. There is no need to materialize -1 as a constant.
Yes, *face palm*. That will require target specific dag combine.
Evan
>
> -Chris
More information about the llvm-dev
mailing list