Skip to content

Commit f87ac68

Browse files
committed
Extra change to complete dissociation.
1 parent c956e4b commit f87ac68

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ void SPIRVModuleAnalysis::setBaseInfo(const Module &M) {
185185
// OpenCL 1.0 by default for the OpenCL environment to avoid puzzling
186186
// run-times with Unknown/0.0 version output. For a reference, LLVM-SPIRV
187187
// Translator avoids potential issues with run-times in a similar manner.
188-
if (ST->isOpenCLEnv()) {
188+
// FIXME: At the moment, `isOpenCLEnv()` is not precise enough. This is
189+
// because the Triple is not always precise enough. For now, we'll rely
190+
// instead on `isLogicalSPIRV()`, but this should be changed when
191+
// `isOpenCLEnv()` is precise enough.
192+
if (!ST->isLogicalSPIRV()) {
189193
MAI.SrcLang = SPIRV::SourceLanguage::OpenCL_CPP;
190194
MAI.SrcLangVersion = 100000;
191195
} else {

0 commit comments

Comments
 (0)