[llvm-commits] [PATCH] Replace SUB with CMP if possible on X86
Manman Ren
mren at apple.com
Wed May 30 20:56:40 PDT 2012
PING
On May 30, 2012, at 1:55 PM, Manman Ren wrote:
>
> SUB with memory operand should not be optimized.
> Updated patch is attached.
>
> Manman
> <convert_sub_to_cmp.patch>
> On May 30, 2012, at 11:44 AM, Manman Ren wrote:
>
>>
>> Hi All,
>>
>> This patch is to optimize generated code from
>> movq %rdi, %rax
>> subq %rsi, %rax
>> cmovsq %rsi, %rdi
>> movq %rdi, %rax
>>
>> to
>> cmpq %rsi, %rdi
>> cmovsq %rsi, %rdi
>> movq %rdi, %rax
>>
>> The only criterion to perform this optimization is that the actual result of SUB is not used.
>>
>> Thanks,
>> Manman
>>
>> <convert_sub_to_cmp.patch>
>
More information about the llvm-commits
mailing list