Skip to content

Commit c851e45

Browse files
committed
fix
1 parent e3c1b7c commit c851e45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ static void addOpDecorateReqs(const MachineInstr &MI, unsigned DecIndex,
920920
} else if (Dec == SPIRV::Decoration::FPMaxErrorDecorationINTEL) {
921921
Reqs.addRequirements(SPIRV::Capability::FPMaxErrorINTEL);
922922
Reqs.addExtension(SPIRV::Extension::SPV_INTEL_fp_max_error);
923-
}else if (Dec == SPIRV::Decoration::MathOpDSPModeINTEL) {
923+
} else if (Dec == SPIRV::Decoration::MathOpDSPModeINTEL) {
924924
Reqs.addExtension(SPIRV::Extension::Extension::SPV_INTEL_fpga_dsp_control);
925925
}
926926
}
@@ -2024,7 +2024,8 @@ static void handleFunctionDecoration(llvm::Module::const_iterator F,
20242024
if (ST.canUseExtension(
20252025
SPIRV::Extension::Extension::SPV_INTEL_fpga_dsp_control)) {
20262026
std::vector<uint32_t> params = getMetaDataValues(MetaDataList);
2027-
params.push_back(0);
2027+
if (params.size() == 1)
2028+
params.push_back(0);
20282029
buildOpDecorate(Des, *curr, TII, SPIRV::Decoration::MathOpDSPModeINTEL,
20292030
params);
20302031
}

0 commit comments

Comments
 (0)