diff --git a/lib/SPIRVProducerPass.cpp b/lib/SPIRVProducerPass.cpp index 2bb3cc38a..0539137ab 100644 --- a/lib/SPIRVProducerPass.cpp +++ b/lib/SPIRVProducerPass.cpp @@ -531,11 +531,13 @@ struct SPIRVProducerPassImpl { bool CalledWithCoherentResource(Argument &Arg); bool NeedDecorationNoContraction(spv::Op op) { - static const SmallVector list_full = {spv::OpFMul, spv::OpFDiv, - spv::OpFNegate, spv::OpFAdd, - spv::OpFSub, spv::OpFRem}; + static const SmallVector list_full = { + spv::OpFMul, spv::OpFDiv, spv::OpFNegate, + spv::OpFAdd, spv::OpFSub, spv::OpFRem, + spv::OpFConvert, spv::OpConvertUToF, spv::OpConvertSToF}; static const SmallVector list_mad_enable = { - spv::OpFDiv, spv::OpFNegate, spv::OpFSub, spv::OpFRem}; + spv::OpFDiv, spv::OpFNegate, spv::OpFSub, spv::OpFRem, + spv::OpFConvert, spv::OpConvertUToF, spv::OpConvertSToF}; auto check_list = [&op](const SmallVector &list) { for (auto opf : list) { if (op == opf)