Skip to content

Commit 22757c7

Browse files
committed
skip embeding spv when empty spv loc is specified
Signed-off-by: jinge90 <[email protected]>
1 parent df64058 commit 22757c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/SYCLLowerIR/ComputeModuleRuntimeInfo.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ PropSetRegTy computeModuleProperties(const Module &M,
168168
const StringRef &DeviceLibSPVLoc) {
169169

170170
PropSetRegTy PropSet;
171-
{
171+
// If sycl-post-link doesn't specify a valid fallback spv path, the param
172+
// 'DeviceLibSPVLoc' is set to an empty string.
173+
if (!DeviceLibSPVLoc.empty()) {
172174
SmallVector<llvm::DeviceLibExt, 16> RequiredLibs;
173175
llvm::getRequiredSYCLDeviceLibs(M, RequiredLibs);
174176
for (auto Ext : RequiredLibs) {

0 commit comments

Comments
 (0)