Implement PPCInstrInfo::FoldImmediate
authorHal Finkel <hfinkel@anl.gov>
Sat, 6 Apr 2013 19:30:30 +0000 (19:30 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 6 Apr 2013 19:30:30 +0000 (19:30 +0000)
commitd61d4f80e6db0dd3f94bb041c5107c5a91ae093d
treea8e013fb99b73c42cc4ba744f71bd5d0c8896d3a
parent8fc33e5d9559fef34a1dd6c1a3febe38df0b4279
Implement PPCInstrInfo::FoldImmediate

There are certain PPC instructions into which we can fold a zero immediate
operand. We can detect such cases by looking at the register class required
by the using operand (so long as it is not otherwise constrained).

llvm-svn: 178961
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.h
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
llvm/test/CodeGen/PowerPC/fold-zero.ll [new file with mode: 0644]