Index: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp +++ lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp @@ -548,7 +548,10 @@ // register. ProgInfo.FloatMode = getFPMode(MF); - ProgInfo.IEEEMode = 0; + if (STM.enableIEEEBit(MF)) + ProgInfo.IEEEMode = 1; + else + ProgInfo.IEEEMode = 0; // Make clamp modifier on NaN input returns 0. ProgInfo.DX10Clamp = 1; Index: lib/Target/AMDGPU/AMDGPUSubtarget.h =================================================================== --- lib/Target/AMDGPU/AMDGPUSubtarget.h +++ lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -249,6 +249,10 @@ return DumpCode; } + bool enableIEEEBit(const MachineFunction &MF) const { + return AMDGPU::isCompute(MF.getFunction()->getCallingConv()); + } + /// Return the amount of LDS that can be used that will not restrict the /// occupancy lower than WaveCount. unsigned getMaxLocalMemSizeWithWaveCount(unsigned WaveCount) const;