summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorWei Ding <wei.ding2@amd.com>2016-10-19 22:34:49 +0000
committerWei Ding <wei.ding2@amd.com>2016-10-19 22:34:49 +0000
commit3cb2a1e8d1b80633ead8d8a0abc8733bfaaede59 (patch)
tree32517cc50858649ae4df68467d75c924784efb60 /llvm/lib
parent412d045e81d97ff4600af6e98c7c329de9f4c3f5 (diff)
downloadbcm5719-llvm-3cb2a1e8d1b80633ead8d8a0abc8733bfaaede59.tar.gz
bcm5719-llvm-3cb2a1e8d1b80633ead8d8a0abc8733bfaaede59.zip
AMDGPU : Add a function to enable and disable IEEEBit for SC and shader
respectively. Differential Revision: http://reviews.llvm.org/D25789 llvm-svn: 284655
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp2
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
index 67b11a9054a..b8e6e95ccce 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -548,7 +548,7 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
// register.
ProgInfo.FloatMode = getFPMode(MF);
- ProgInfo.IEEEMode = 0;
+ ProgInfo.IEEEMode = STM.enableIEEEBit(MF);
// Make clamp modifier on NaN input returns 0.
ProgInfo.DX10Clamp = 1;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index 5682d999313..b82c96a7536 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -249,6 +249,10 @@ public:
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;
OpenPOWER on IntegriCloud