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

Manman Ren mren at apple.com
Fri Jul 27 20:19:15 PDT 2012


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

Manman

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




More information about the llvm-commits mailing list