add a micro optzn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50681 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-05-05 23:19:45 +00:00
parent ab3e747c64
commit 88c1baa50c

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