diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2011-03-17 01:22:09 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2011-03-17 01:22:09 +0000 |
| commit | e8f2be0c10666dfe21d6e8304638e8c38d11da05 (patch) | |
| tree | 2403406455869e81d540ab222fa55e73a037452c /llvm/lib/Target | |
| parent | 6f6fb3e5155389093e2b157f790556634cead004 (diff) | |
| download | bcm5719-llvm-e8f2be0c10666dfe21d6e8304638e8c38d11da05.tar.gz bcm5719-llvm-e8f2be0c10666dfe21d6e8304638e8c38d11da05.zip | |
A couple new README entries.
llvm-svn: 127786
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/README.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index abd1515cf5d..77a513de8a7 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -1947,3 +1947,39 @@ which is "perfect". //===---------------------------------------------------------------------===// +For the branch in the following code: +int a(); +int b(int x, int y) { + if (x & (1<<(y&7))) + return a(); + return y; +} + +We currently generate: + movb %sil, %al + andb $7, %al + movzbl %al, %eax + btl %eax, %edi + jae .LBB0_2 + +movl+andl would be shorter than the movb+andb+movzbl sequence. + +//===---------------------------------------------------------------------===// + +For the following: +struct u1 { + float x, y; +}; +float foo(struct u1 u) { + return u.x + u.y; +} + +We currently generate: + movdqa %xmm0, %xmm1 + pshufd $1, %xmm0, %xmm0 # xmm0 = xmm0[1,0,0,0] + addss %xmm1, %xmm0 + ret + +We could save an instruction here by commuting the addss. + +//===---------------------------------------------------------------------===// |

