[SPIR-V] Emit OpExecutionMode ContractionOff for no FP_CONTRACT metadata
authorMichal Paszkowski <michal.paszkowski@outlook.com>
Wed, 18 Jan 2023 21:23:11 +0000 (22:23 +0100)
committerMichal Paszkowski <michal.paszkowski@outlook.com>
Thu, 19 Jan 2023 14:26:34 +0000 (15:26 +0100)
commit2bcedd464348e170587b6f798d021f4e182f62e2
tree135ebb31bfa244fc578295504861a93f03a29589
parent4ace72ee20199d616532e72184bd078cb737e058
[SPIR-V] Emit OpExecutionMode ContractionOff for no FP_CONTRACT metadata

This change makes the AsmPrinter emit OpExecutionMode ContractionOff
when both opencl.enable.FP_CONTRACT and spirv.ExecutionMode
metadata are not present.

Differential Revision: https://reviews.llvm.org/D141734
llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
llvm/test/CodeGen/SPIRV/opencl/metadata/fp_contractions_metadata.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/opencl/metadata/kernel_arg_type_function_metadata.ll [moved from llvm/test/CodeGen/SPIRV/opencl/kernel_arg_type_function_metadata.ll with 100% similarity]
llvm/test/CodeGen/SPIRV/opencl/metadata/kernel_arg_type_module_metadata.ll [moved from llvm/test/CodeGen/SPIRV/opencl/kernel_arg_type_module_metadata.ll with 100% similarity]
llvm/test/CodeGen/SPIRV/opencl/metadata/no_fp_contractions_metadata.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/opencl/metadata/opencl_version_metadata.ll [moved from llvm/test/CodeGen/SPIRV/metadata-opencl.ll with 100% similarity]