[llvm-commits] [PATCH] Replace SUB with CMP if possible on X86

Manman Ren mren at apple.com
Wed May 30 11:44:47 PDT 2012


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

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


More information about the llvm-commits mailing list