diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-18 02:27:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-18 02:27:00 +0000 |
commit | 726075fdf89ddd8206e9a7504b9a88070b7e6c8c (patch) | |
tree | 2e69b1f5bc12ed64415d743e9463c753bb33bf0a /llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | |
parent | a983c3df1c6fdcaa98afaab07ed298707daf9aad (diff) | |
download | bcm5719-llvm-726075fdf89ddd8206e9a7504b9a88070b7e6c8c.tar.gz bcm5719-llvm-726075fdf89ddd8206e9a7504b9a88070b7e6c8c.zip |
Teach the addressing mode stuff to fold "%lo" into 'ri' addressing modes,
allowing us to compile this:
to this:
%G1 = external global int
%G2 = external global int
void %test() {
%X = load int* %G1
store int %X, int* %G2
ret void
}
test:
save -96, %sp, %sp
sethi %hi(G1), %l0
ld [%l0+%lo(G1)], %l0
sethi %hi(G2), %l1
st %l0, [%l1+%lo(G2)]
restore %g0, %g0, %g0
retl
nop
instead of this:
test:
save -96, %sp, %sp
sethi %hi(G1), %l0
or %g0, %lo(G1), %l1
ld [%l1+%l0], %l0
sethi %hi(G2), %l1
or %g0, %lo(G2), %l2
st %l0, [%l2+%l1]
restore %g0, %g0, %g0
retl
nop
llvm-svn: 24812
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
0 files changed, 0 insertions, 0 deletions