aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocIterativeScan.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-18 06:02:59 +0000
committerChris Lattner <sabre@nondot.org>2005-09-18 06:02:59 +0000
commit0b7c0bf249ba0e2ace87276b184fd3a1dbfc02a9 (patch)
tree99d7de2c63a4c1735eebd543cf7f4976d8a3f6a2 /lib/CodeGen/RegAllocIterativeScan.cpp
parent5aa7666ebe5acaa0195ffc99ff5a6d3fe4896751 (diff)
Generalize this transform, using MaskedValueIsZero, allowing us to compile:
struct S { unsigned int i : 6, j : 11, k : 15; } b; void plus3 (unsigned int x) { b.k += x; } To: plus3: mov %EAX, DWORD PTR [%ESP + 4] shl %EAX, 17 add DWORD PTR [b], %EAX ret instead of: plus3: mov %EAX, DWORD PTR [%ESP + 4] shl %EAX, 17 mov %ECX, DWORD PTR [b] add %EAX, %ECX and %EAX, -131072 and %ECX, 131071 or %ECX, %EAX mov DWORD PTR [b], %ECX ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocIterativeScan.cpp')
0 files changed, 0 insertions, 0 deletions