diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-18 06:30:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-18 06:30:59 +0000 |
commit | 150f12af7f2e84888787b8aac3561853cf6a9e5a (patch) | |
tree | e3355e12a9842da78ff7e4e524390c8ca8b5cfb5 /lib/CodeGen/RegAllocIterativeScan.cpp | |
parent | 0b7c0bf249ba0e2ace87276b184fd3a1dbfc02a9 (diff) |
Compile
struct S { unsigned int i : 6, j : 11, k : 15; } b;
void plus2 (unsigned int x) {
b.j += x;
}
to:
plus2:
mov %EAX, DWORD PTR [b]
mov %ECX, %EAX
and %ECX, 131008
mov %EDX, DWORD PTR [%ESP + 4]
shl %EDX, 6
add %EDX, %ECX
and %EDX, 131008
and %EAX, -131009
or %EDX, %EAX
mov DWORD PTR [b], %EDX
ret
instead of:
plus2:
mov %EAX, DWORD PTR [b]
mov %ECX, %EAX
shr %ECX, 6
and %ECX, 2047
add %ECX, DWORD PTR [%ESP + 4]
shl %ECX, 6
and %ECX, 131008
and %EAX, -131009
or %ECX, %EAX
mov DWORD PTR [b], %ECX
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocIterativeScan.cpp')
0 files changed, 0 insertions, 0 deletions