diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-05-28 00:35:15 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-05-28 00:35:15 +0000 |
commit | 8b944d39b356135676459152385f05c496951f6c (patch) | |
tree | 6a1c962c410e68929b12e2753749314181570188 /lib/Target/CppBackend/CPPBackend.cpp | |
parent | c2695eba5700c785c2ae144eede7e1a932e3f5f3 (diff) |
Added optimization that narrow load / op / store and the 'op' is a bit twiddling instruction and its second operand is an immediate. If bits that are touched by 'op' can be done with a narrower instruction, reduce the width of the load and store as well. This happens a lot with bitfield manipulation code.
e.g.
orl $65536, 8(%rax)
=>
orb $1, 10(%rax)
Since narrowing is not always a win, e.g. i32 -> i16 is a loss on x86, dag combiner consults with the target before performing the optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
0 files changed, 0 insertions, 0 deletions