diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index f6dd82228be..ad60cb6e1a6 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -52,6 +52,8 @@ bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM, // FIXME: Implement the switch instruction in the instruction selector! PM.add(createLowerSwitchPass()); + PM.add(createLowerConstantExpressionsPass()); + PM.add(createPPCSimpleInstructionSelector(*this)); if (PrintMachineCode) @@ -81,6 +83,8 @@ void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // FIXME: Implement the switch instruction in the instruction selector! PM.add(createLowerSwitchPass()); + PM.add(createLowerConstantExpressionsPass()); + PM.add(createPPCSimpleInstructionSelector(TM)); PM.add(createRegisterAllocator()); PM.add(createPrologEpilogCodeInserter());