Index: llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp =================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp +++ llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp @@ -500,6 +500,9 @@ } bool SystemZElimCompare::runOnMachineFunction(MachineFunction &F) { + if (skipFunction(*F.getFunction())) + return false; + TII = static_cast(F.getSubtarget().getInstrInfo()); TRI = &TII->getRegisterInfo(); Index: llvm/trunk/lib/Target/SystemZ/SystemZLDCleanup.cpp =================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZLDCleanup.cpp +++ llvm/trunk/lib/Target/SystemZ/SystemZLDCleanup.cpp @@ -64,6 +64,9 @@ } bool SystemZLDCleanup::runOnMachineFunction(MachineFunction &F) { + if (skipFunction(*F.getFunction())) + return false; + TII = static_cast(F.getSubtarget().getInstrInfo()); MF = &F; Index: llvm/trunk/lib/Target/SystemZ/SystemZShortenInst.cpp =================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZShortenInst.cpp +++ llvm/trunk/lib/Target/SystemZ/SystemZShortenInst.cpp @@ -268,6 +268,9 @@ } bool SystemZShortenInst::runOnMachineFunction(MachineFunction &F) { + if (skipFunction(*F.getFunction())) + return false; + const SystemZSubtarget &ST = F.getSubtarget(); TII = ST.getInstrInfo(); TRI = ST.getRegisterInfo();