diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 13:02:28 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 13:02:28 +0000 |
commit | 012402346fb796e159129676fd022e8e9c68afa4 (patch) | |
tree | 13709d7439808458710e692030a1dca67c906da4 /llvm/lib/Target/SystemZ/SystemZShortenInst.cpp | |
parent | 510de640c3c4693cd6981e5765110a7f676f9a37 (diff) | |
download | bcm5719-llvm-012402346fb796e159129676fd022e8e9c68afa4.tar.gz bcm5719-llvm-012402346fb796e159129676fd022e8e9c68afa4.zip |
[SystemZ] Add patterns to load a constant into a high word (IIHF)
Similar to low words, we can use the shorter LLIHL and LLIHH if it turns
out that the other half of the GR64 isn't live.
llvm-svn: 191750
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZShortenInst.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZShortenInst.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp index b4808646717..537a5455404 100644 --- a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp +++ b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp @@ -58,6 +58,7 @@ SystemZShortenInst::SystemZShortenInst(const SystemZTargetMachine &tm) for (unsigned I = 0; I < 16; ++I) { LowGPRs[SystemZMC::GR32Regs[I]] |= 1 << I; LowGPRs[SystemZMC::GR64Regs[I]] |= 1 << I; + HighGPRs[SystemZMC::GRH32Regs[I]] |= 1 << I; HighGPRs[SystemZMC::GR64Regs[I]] |= 1 << I; if (unsigned GR128 = SystemZMC::GR128Regs[I]) { LowGPRs[GR128] |= 3 << I; @@ -122,6 +123,9 @@ bool SystemZShortenInst::processBlock(MachineBasicBlock *MBB) { if (Opcode == SystemZ::IILF) Changed |= shortenIIF(MI, LowGPRs, LiveHigh, SystemZ::LLILL, SystemZ::LLILH); + else if (Opcode == SystemZ::IIHF) + Changed |= shortenIIF(MI, HighGPRs, LiveLow, SystemZ::LLIHL, + SystemZ::LLIHH); unsigned UsedLow = 0; unsigned UsedHigh = 0; for (MachineInstr::mop_iterator MOI = MI.operands_begin(), |