mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 06:06:32 +00:00
Eliminate getClass, it is not needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9489c04efc
commit
a411bef105
@ -53,13 +53,12 @@ void IA64RegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
unsigned SrcReg, int FrameIdx,
|
||||
const TargetRegisterClass *RC) const{
|
||||
|
||||
if (getClass(SrcReg) == IA64::FPRegisterClass) {
|
||||
if (RC == IA64::FPRegisterClass) {
|
||||
BuildMI(MBB, MI, IA64::STF8, 2).addFrameIndex(FrameIdx).addReg(SrcReg);
|
||||
}
|
||||
else if (getClass(SrcReg) == IA64::GRRegisterClass) {
|
||||
} else if (RC == IA64::GRRegisterClass) {
|
||||
BuildMI(MBB, MI, IA64::ST8, 2).addFrameIndex(FrameIdx).addReg(SrcReg);
|
||||
}
|
||||
else if (getClass(SrcReg) == IA64::PRRegisterClass) {
|
||||
else if (RC == IA64::PRRegisterClass) {
|
||||
/* we use IA64::r2 as a temporary register for doing this hackery. */
|
||||
// first we load 0:
|
||||
BuildMI(MBB, MI, IA64::MOV, 1, IA64::r2).addReg(IA64::r0);
|
||||
@ -77,11 +76,11 @@ void IA64RegisterInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
unsigned DestReg, int FrameIdx,
|
||||
const TargetRegisterClass *RC)const{
|
||||
|
||||
if (getClass(DestReg) == IA64::FPRegisterClass) {
|
||||
if (RC == IA64::FPRegisterClass) {
|
||||
BuildMI(MBB, MI, IA64::LDF8, 1, DestReg).addFrameIndex(FrameIdx);
|
||||
} else if (getClass(DestReg) == IA64::GRRegisterClass) {
|
||||
} else if (RC == IA64::GRRegisterClass) {
|
||||
BuildMI(MBB, MI, IA64::LD8, 1, DestReg).addFrameIndex(FrameIdx);
|
||||
} else if (getClass(DestReg) == IA64::PRRegisterClass) {
|
||||
} else if (RC == IA64::PRRegisterClass) {
|
||||
// first we load a byte from the stack into r2, our 'predicate hackery'
|
||||
// scratch reg
|
||||
BuildMI(MBB, MI, IA64::LD8, 1, IA64::r2).addFrameIndex(FrameIdx);
|
||||
|
Loading…
Reference in New Issue
Block a user