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 7
7
// HIPSTDPAR-PRE: Running pass: EntryExitInstrumenterPass
8
8
// HIPSTDPAR-PRE-NEXT: Running pass: EntryExitInstrumenterPass
9
9
// HIPSTDPAR-PRE-NOT: Running pass: HipStdParAcceleratorCodeSelectionPass
10
+ // HIPSTDPAR-PRE-NEXT: Running pass: AMDGPUExpandFeaturePredicatesPass
10
11
// HIPSTDPAR-PRE-NEXT: Running pass: AlwaysInlinerPass
11
12
12
13
// 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) {
812
812
#define GET_PASS_REGISTRY " AMDGPUPassRegistry.def"
813
813
#include " llvm/Passes/TargetPassRegistry.inc"
814
814
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
+
815
825
PB.registerScalarOptimizerLateEPCallback (
816
826
[](FunctionPassManager &FPM, OptimizationLevel Level) {
817
827
if (Level == OptimizationLevel::O0)
Original file line number Diff line number Diff line change 2
2
; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O1>" -print-pipeline-passes %s -o - | FileCheck %s
3
3
; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O2>" -print-pipeline-passes %s -o - | FileCheck %s
4
4
; 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
5
9
6
10
; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O0>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
7
11
; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O1>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
8
12
; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O2>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
9
13
; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto-pre-link<O3>" -print-pipeline-passes -amdgpu-internalize-symbols %s -o - | FileCheck --check-prefix=PRE %s
10
14
11
-
15
+ ; CHECK: amdgpu-expand-feature-predicates
12
16
; CHECK: amdgpu-attributor
17
+ ; O0: amdgpu-expand-feature-predicates
13
18
; O0-NOT: amdgpu-attributor
14
19
20
+ ; PRE: amdgpu-expand-feature-predicates
15
21
; PRE-NOT: internalize
16
22
; PRE-NOT: amdgpu-attributor
17
23
; PRE-NOT: printfToRuntime
You can’t perform that action at this time.
0 commit comments