summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/DemoteRegToStack.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
commit01f56c68e947157ab3aa6a3bfde7ebde73d18821 (patch)
tree400a568cdf15f159db9a7127141b841351dd0acc /llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
parent4ebc8ab4e0bb69dd7abfe04f80e49e5f217cdeb9 (diff)
downloadbcm5719-llvm-01f56c68e947157ab3aa6a3bfde7ebde73d18821.tar.gz
bcm5719-llvm-01f56c68e947157ab3aa6a3bfde7ebde73d18821.zip
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 llvm-svn: 23384
Diffstat (limited to 'llvm/lib/Transforms/Utils/DemoteRegToStack.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud