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)
commit839b9096538f790a2bb060547df24703807cb83b
tree0cf51af4bf2e88a7a170f6ef96961f35b7699a07
parent012ffd56059576d4a0ee523f673b3190b1f03311
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178961 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
lib/Target/PowerPC/PPCRegisterInfo.cpp
test/CodeGen/PowerPC/fold-zero.ll [new file with mode: 0644]