[llvm-commits] [Patch] Optimize away a cmp instruction on X86

Manman Ren mren at apple.com
Tue May 29 11:33:24 PDT 2012


Hi All,

This patch is to generalize an earlier patch (r155919), it will handle the following cases where we can remove a CMP:
  (a >|>=|<|<= b) ? (a-b) : any
  (a >|>=|<|<= b) ? any : (a-b)
  (b >|>=|<|<= a) ? (a-b) : any
  (b >|>=|<|<= a) ? any : (a-b)

A corresponding optimization on ARM was implemented in peephole pass.

Thanks,
Manman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: optimize_sub_cmp_x86.patch
Type: application/octet-stream
Size: 5748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120529/c8d69a68/attachment.obj>


More information about the llvm-commits mailing list