[llvm-commits] [PATCH] Update peephole optimization for ARM: modified OptimizeCompare

Manman Ren mren at apple.com
Tue May 8 18:05:56 PDT 2012


The purpose is to optimize the following cases:
//       sub r1, r3
//       cmp r3, r1 or cmp r1, r3
//       bge L1

//      sub r1, imm
//      cmp r1, imm
//      bge L1

//     If the branch instruction can use flag from "sub", then we can eliminate
//     the "cmp" instruction.


Comments are welcome.

Thanks,
Manman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: peephole_sub_cmp.patch
Type: application/octet-stream
Size: 9341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120508/a9886a76/attachment.obj>


More information about the llvm-commits mailing list