diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-19 07:11:01 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-19 07:11:01 +0000 | 
| commit | 2947801735ea3ffdc48829ed48cc605e79d3abd9 (patch) | |
| tree | 28af5c6219e3e8287e5269b8f3af5671d77f7d8a /llvm/lib/Transforms | |
| parent | ea42c15da9eec9fb3b959d2e54e3b34483e23ab2 (diff) | |
| download | bcm5719-llvm-2947801735ea3ffdc48829ed48cc605e79d3abd9.tar.gz bcm5719-llvm-2947801735ea3ffdc48829ed48cc605e79d3abd9.zip | |
Teach the code generator that shrd/shld is commutable if it has an immediate.
This allows us to generate this:
foo:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %EDX, DWORD PTR [%ESP + 8]
        shld %EDX, %EDX, 2
        shl %EAX, 2
        ret
instead of this:
foo:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, DWORD PTR [%ESP + 8]
        mov %EDX, %EAX
        shrd %EDX, %ECX, 30
        shl %EAX, 2
        ret
Note the magically transmogrifying immediate.
llvm-svn: 19686
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions

