mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 18:06:49 +00:00
A couple new README entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f21b1058a1
commit
3d831381a9
@ -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.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user