summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-01-24 22:02:15 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-01-24 22:02:15 +0000
commit7aad8fd8f45e07d72e50792aec18c2b476bdd96e (patch)
treec4944a9d92eed6e454c369d9723cad854da9498b /llvm/lib/Target
parente4c1dd2c08586649ebb3ae1e51ad98f0efabaf68 (diff)
downloadbcm5719-llvm-7aad8fd8f45e07d72e50792aec18c2b476bdd96e.tar.gz
bcm5719-llvm-7aad8fd8f45e07d72e50792aec18c2b476bdd96e.zip
Enable FeatureFlatForGlobal on Volcanic Islands
This switches to the workaround that HSA defaults to for the mesa path. This should be applied to the 4.0 branch. Patch by Vedran Miletić <vedran@miletic.net> llvm-svn: 292982
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPU.td17
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp1
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h1
3 files changed, 17 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.td b/llvm/lib/Target/AMDGPU/AMDGPU.td
index 0c5f9e72b52..371042d8b4c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPU.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPU.td
@@ -305,10 +305,23 @@ def FeatureEnableSIScheduler : SubtargetFeature<"si-scheduler",
"Enable SI Machine Scheduler"
>;
+def FeatureNoAddr64 : SubtargetFeature<"mubuf-no-addr64",
+ "NoAddr64",
+ "true",
+ "MUBUF instructions have addr64 bit"
+>;
+
+// Unless +-flat-for-global is specified, turn on FlatForGlobal for
+// all OS-es on VI and newer hardware to avoid assertion failures due
+// to missing ADDR64 variants of MUBUF instructions.
+// FIXME: moveToVALU should be able to handle converting addr64 MUBUF
+// instructions.
+
def FeatureFlatForGlobal : SubtargetFeature<"flat-for-global",
"FlatForGlobal",
"true",
- "Force to generate flat instruction for global"
+ "Force to generate flat instruction for global",
+ [FeatureNoAddr64]
>;
// Dummy feature used to disable assembler instructions.
@@ -361,7 +374,7 @@ def FeatureVolcanicIslands : SubtargetFeatureGeneration<"VOLCANIC_ISLANDS",
FeatureGCN3Encoding, FeatureCIInsts, Feature16BitInsts,
FeatureSMemRealTime, FeatureVGPRIndexMode, FeatureMovrel,
FeatureScalarStores, FeatureInv2PiInlineImm, FeatureSDWA,
- FeatureDPP
+ FeatureDPP, FeatureNoAddr64
]
>;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
index 4848b3b86bd..5064d9e8e7a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -82,6 +82,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
FP64FP16Denormals(false),
FPExceptions(false),
FlatForGlobal(false),
+ NoAddr64(false),
UnalignedScratchAccess(false),
UnalignedBufferAccess(false),
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index c8414f97808..bc43a6851e2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -85,6 +85,7 @@ protected:
bool FP64FP16Denormals;
bool FPExceptions;
bool FlatForGlobal;
+ bool NoAddr64;
bool UnalignedScratchAccess;
bool UnalignedBufferAccess;
bool EnableXNACK;
OpenPOWER on IntegriCloud