summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
diff options
context:
space:
mode:
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-04-21 19:45:22 +0000
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-04-21 19:45:22 +0000
commit3d1cc88c68cd380f5fc55d95d323d7ba7ba98eb6 (patch)
treea3eb52e0cf247a5d747ca7efeb91bbee624a0213 /llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
parent9703df2b360a88758def72b66b395c1709ced9f5 (diff)
downloadbcm5719-llvm-3d1cc88c68cd380f5fc55d95d323d7ba7ba98eb6.tar.gz
bcm5719-llvm-3d1cc88c68cd380f5fc55d95d323d7ba7ba98eb6.zip
AMDGPU: Temporarily disable packed inlinable literals (v2f16, v2i16)
Differential Revision: https://reviews.llvm.org/D32361 llvm-svn: 301028
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 86095a8e114..5a3242bed1d 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -93,6 +93,12 @@ unsigned getVmcntBitWidthHi() { return 2; }
} // end namespace anonymous
namespace llvm {
+
+static cl::opt<bool> EnablePackedInlinableLiterals(
+ "enable-packed-inlinable-literals",
+ cl::desc("Enable packed inlinable literals (v2f16, v2i16)"),
+ cl::init(false));
+
namespace AMDGPU {
namespace IsaInfo {
@@ -703,6 +709,9 @@ bool isInlinableLiteral16(int16_t Literal, bool HasInv2Pi) {
bool isInlinableLiteralV216(int32_t Literal, bool HasInv2Pi) {
assert(HasInv2Pi);
+ if (!EnablePackedInlinableLiterals)
+ return false;
+
int16_t Lo16 = static_cast<int16_t>(Literal);
int16_t Hi16 = static_cast<int16_t>(Literal >> 16);
return Lo16 == Hi16 && isInlinableLiteral16(Lo16, HasInv2Pi);
OpenPOWER on IntegriCloud