diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-05-05 23:19:45 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-05-05 23:19:45 +0000 | 
| commit | 6e2bf7c67e7fee1e4c9ba15cefd944eff5960470 (patch) | |
| tree | c208c60773929c9168dca782e59dbc75bee916bf /llvm/lib/Target | |
| parent | 046845e84226a3aa343a64eba368b710bbfb8d1a (diff) | |
| download | bcm5719-llvm-6e2bf7c67e7fee1e4c9ba15cefd944eff5960470.tar.gz bcm5719-llvm-6e2bf7c67e7fee1e4c9ba15cefd944eff5960470.zip | |
add a micro optzn.
llvm-svn: 50681
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/README.txt | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index fcbae96bee0..6f6abd478db 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -1691,3 +1691,21 @@ LBB1_1:	## bb.i    ...  //===---------------------------------------------------------------------===// + +We compile: + +int test(int x, int y) { +  return x-y-1; +} + +into (-m64): + +_test: +	decl	%edi +	movl	%edi, %eax +	subl	%esi, %eax +	ret + +it would be better to codegen as: x+~y  (notl+addl) + +//===---------------------------------------------------------------------===// | 

