diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-09-27 23:52:58 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-09-27 23:52:58 +0000 |
commit | 7c2b1e71c13e88e0788c5e26e6a366fecea06238 (patch) | |
tree | f10554a55fe9846eebdbde16c015dac2ac2bebe8 /llvm/lib/Target/ARM/ARMInstrInfo.cpp | |
parent | b0934cdd1cbb561755b16701d735eb39ca7ccba7 (diff) | |
download | bcm5719-llvm-7c2b1e71c13e88e0788c5e26e6a366fecea06238.tar.gz bcm5719-llvm-7c2b1e71c13e88e0788c5e26e6a366fecea06238.zip |
Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
This should be better than single load from constpool.
llvm-svn: 82948
Diffstat (limited to 'llvm/lib/Target/ARM/ARMInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.cpp b/llvm/lib/Target/ARM/ARMInstrInfo.cpp index 4c92891c82b..15c3c393c32 100644 --- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp @@ -96,6 +96,9 @@ reMaterialize(MachineBasicBlock &MBB, MachineInstr *MI = MBB.getParent()->CloneMachineInstr(Orig); MI->getOperand(0).setReg(DestReg); + if (Orig->getOpcode() == ARM::MOVTi16) + MI->getOperand(1).setReg(DestReg); + MBB.insert(I, MI); } |