[llvm-commits] patch: don't remove CMP if used by instruction that both reads and modifies EFLAGS

Nick Lewycky nicholas at mxc.ca
Sat Jul 28 03:08:10 PDT 2012


Manman Ren wrote:
>
> Yes, your patch fixed the problem.
> I was working on this without checking emails and submitted a similar patch at r160912.
> Sorry about that :)

No problem, thanks for the fix!!

Nick

> On Jul 27, 2012, at 7:14 PM, Nick Lewycky wrote:
>
>> This patch fixes PR13475, a miscompile in unzip. The problem manifested in code like:
>>
>>          subl    %esi, %eax
>>          cmpl    %edx, %esi
>>          sbbb    %cl, %cl
>>
>> where we concluded that it was safe to remove the cmp without changing the sbb. Please review!
>>
>> Nick
>>
>> PS. There's an optimization opportunity here, to turn the cmp+sbbb into a setnc.
>> <pr13475-1.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> 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