File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
clang/test/CodeGenHipStdPar Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 77// HIPSTDPAR-PRE: Running pass: EntryExitInstrumenterPass
88// HIPSTDPAR-PRE-NEXT: Running pass: EntryExitInstrumenterPass
99// HIPSTDPAR-PRE-NOT: Running pass: HipStdParAcceleratorCodeSelectionPass
10+ // HIPSTDPAR-PRE-NEXT: Running pass: AMDGPUExpandFeaturePredicatesPass
1011// HIPSTDPAR-PRE-NEXT: Running pass: AlwaysInlinerPass
1112
1213// Ensure Pass HipStdParAcceleratorCodeSelectionPass is invoked in PostLink.
Original file line number Diff line number Diff line change @@ -812,6 +812,16 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
812812#define GET_PASS_REGISTRY " AMDGPUPassRegistry.def"
813813#include " llvm/Passes/TargetPassRegistry.inc"
814814
815+ PB.registerPipelineStartEPCallback (
816+ [this ](ModulePassManager &PM, OptimizationLevel Level) {
817+ PM.addPass (AMDGPUExpandFeaturePredicatesPass (*this ));
818+ });
819+
820+ PB.registerFullLinkTimeOptimizationEarlyEPCallback (
821+ [this ](ModulePassManager &PM, OptimizationLevel Level) {
822+ PM.addPass (AMDGPUExpandFeaturePredicatesPass (*this ));
823+ });
824+
815825 PB.registerScalarOptimizerLateEPCallback (
816826 [](FunctionPassManager &FPM, OptimizationLevel Level) {
817827 if (Level == OptimizationLevel::O0)
Original file line number Diff line number Diff line change 22; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O1>" -print-pipeline-passes %s -o - | FileCheck %s
33; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O2>" -print-pipeline-passes %s -o - | FileCheck %s
44; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O3>" -print-pipeline-passes %s -o - | FileCheck %s
5+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -O0 -print-pipeline-passes %s -o - | FileCheck --check-prefix=O0 %s
6+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -O1 -print-pipeline-passes %s -o - | FileCheck %s
7+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -O2 -print-pipeline-passes %s -o - | FileCheck %s
8+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -print-pipeline-passes %s -o - | FileCheck %s
59
610; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O0>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
711; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O1>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
812; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O2>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
913; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O3>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
1014
11-
15+ ; CHECK: amdgpu-expand-feature-predicates
1216; CHECK: amdgpu-attributor
17+ ; O0: amdgpu-expand-feature-predicates
1318; O0-NOT: amdgpu-attributor
1419
20+ ; PRE: amdgpu-expand-feature-predicates
1521; PRE-NOT: internalize
1622; PRE-NOT: amdgpu-attributor
1723; PRE-NOT: printfToRuntime
You can’t perform that action at this time.
0 commit comments