-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[NFC][SPIRV] Add AMDGCN SPIR-V specific defaults to the BE #165815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3e0abe1
6ac96c6
92749f7
2d9a794
0e331b5
f97d25d
2d43a92
1ead36f
f74c828
83dbc0d
4255cdd
de81a63
2e9bc21
a6d9df5
00ffdaa
acd6bb0
94cad95
b749107
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,7 +244,8 @@ static cl::opt<bool> SPVEnableNonSemanticDI( | |
| cl::Optional, cl::init(false)); | ||
|
|
||
| void SPIRVPassConfig::addPreEmitPass() { | ||
| if (SPVEnableNonSemanticDI) { | ||
| if (SPVEnableNonSemanticDI || | ||
| getSPIRVTargetMachine().getTargetTriple().getVendor() == Triple::AMD) { | ||
|
Comment on lines
+247
to
+248
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if this condition can be moved inside the pass. Maybe in the future... (or may be we can turn it on from the driver). |
||
| addPass(createSPIRVEmitNonSemanticDIPass(&getTM<SPIRVTargetMachine>())); | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| ; REQUIRES: spirv-tools | ||
| ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - --filetype=obj | spirv-dis | FileCheck %s | ||
| ; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - --filetype=obj | spirv-dis | FileCheck --check-prefix=AMDGCNSPIRV %s | ||
|
|
||
| ; CHECK: Generator: {{.*}}{{43|LLVM SPIR-V Backend}}{{.*}} | ||
| ; AMDGCNSPIRV: Generator: {{.*}}{{65535|LLVM SPIR-V Backend}}{{.*}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| ; RUN: llc -O0 -mtriple=spirv64v1.4-unknown-unknown %s -o - --filetype=obj | spirv-dis | FileCheck %s --check-prefix=CHECK-SPIRV14 | ||
| ; RUN: llc -O0 -mtriple=spirv64v1.5-unknown-unknown %s -o - --filetype=obj | spirv-dis | FileCheck %s --check-prefix=CHECK-SPIRV15 | ||
| ; RUN: llc -O0 -mtriple=spirv64v1.6-unknown-unknown %s -o - --filetype=obj | spirv-dis | FileCheck %s --check-prefix=CHECK-SPIRV16 | ||
| ; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - --filetype=obj | spirv-dis | FileCheck %s --check-prefix=AMDGCNSPIRV | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extremely minor: |
||
|
|
||
| ; CHECK-SPIRV10: Version: 1.0 | ||
| ; CHECK-SPIRV11: Version: 1.1 | ||
|
|
@@ -14,3 +15,4 @@ | |
| ; CHECK-SPIRV14: Version: 1.4 | ||
| ; CHECK-SPIRV15: Version: 1.5 | ||
| ; CHECK-SPIRV16: Version: 1.6 | ||
| ; AMDGCNSPIRV: Version: 1.6 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Isn't AMD's generator magic number
10?https://github.com/KhronosGroup/SPIRV-Headers/blob/f2e4bd213104fe323a01e935df56557328d37ac8/include/spirv/spir-v.xml#L34