@@ -348,18 +348,6 @@ bool GenXTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
348348 vc::addPass (PM, createGenXReduceIntSizePass ());
349349 // / .. include:: GenXGlobalValueLowering.cpp
350350 vc::addPass (PM, createGenXGlobalValueLoweringPass ());
351- // / InstructionCombining
352- // / --------------------
353- // / This is a standard LLVM pass, used at this point in the GenX backend.
354- // /
355- vc::addPass (PM, createInstructionCombiningPass ());
356- // Run integer reduction again to revert some trunc/ext patterns transformed
357- // by instcombine.
358- vc::addPass (PM, createGenXReduceIntSizePass ());
359- // / .. include:: GenXSimdCFConformance.cpp
360- vc::addPass (PM, createGenXEarlySimdCFConformancePass ());
361- // / .. include:: GenXPromotePredicate.cpp
362- vc::addPass (PM, createGenXPromotePredicatePass ());
363351
364352 // / .. include:: GenXStackUsage.cpp
365353 vc::addPass (PM, createGenXStackUsagePass ());
@@ -373,6 +361,20 @@ bool GenXTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
373361 vc::addPass (PM, createGenXLoadStoreLoweringPass ());
374362 vc::addPass (PM, createGenXThreadPrivateMemoryPass ());
375363
364+ // / InstructionCombining
365+ // / --------------------
366+ // / This is a standard LLVM pass, used at this point in the GenX backend.
367+ // / Run instcombine after some lowering passes (e.g. GenXLoadStoreLowering) to
368+ // / make a cleanup.
369+ vc::addPass (PM, createInstructionCombiningPass ());
370+ // Run integer reduction again to revert some trunc/ext patterns transformed
371+ // by instcombine.
372+ vc::addPass (PM, createGenXReduceIntSizePass ());
373+ // / .. include:: GenXSimdCFConformance.cpp
374+ vc::addPass (PM, createGenXEarlySimdCFConformancePass ());
375+ // / .. include:: GenXPromotePredicate.cpp
376+ vc::addPass (PM, createGenXPromotePredicatePass ());
377+
376378 // Run GEP lowering again to remove possible GEPs after instcombine.
377379 vc::addPass (PM, createGenXGEPLoweringPass ());
378380 // / .. include:: GenXLowering.cpp
0 commit comments