add a micro optzn.

llvm-svn: 50681
This commit is contained in:
Chris Lattner 2008-05-05 23:19:45 +00:00
parent 34b3f18a70
commit 9f4f2444ea

View File

@ -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)
//===---------------------------------------------------------------------===//