llvm.org GIT mirror llvm / 88c1baa
add a micro optzn. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50681 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 18 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
16901690 ...
16911691
16921692 //===---------------------------------------------------------------------===//
1693
1694 We compile:
1695
1696 int test(int x, int y) {
1697 return x-y-1;
1698 }
1699
1700 into (-m64):
1701
1702 _test:
1703 decl %edi
1704 movl %edi, %eax
1705 subl %esi, %eax
1706 ret
1707
1708 it would be better to codegen as: x+~y (notl+addl)
1709
1710 //===---------------------------------------------------------------------===//