add a micro optzn.

llvm-svn: 50681
This commit is contained in:
Chris Lattner
2008-05-05 23:19:45 +00:00
parent 046845e842
commit 6e2bf7c67e

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