summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-03-08 20:58:11 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-03-08 20:58:11 +0000
commite8c03a25111054ee28ca71c2d75921589ef27861 (patch)
tree9a645fe1d17a6013d0eeb0746be65134d9fe4bee /llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
parentae56ff925bfd73511e60a6a6c84b279e0c4acca5 (diff)
downloadbcm5719-llvm-e8c03a25111054ee28ca71c2d75921589ef27861.tar.gz
bcm5719-llvm-e8c03a25111054ee28ca71c2d75921589ef27861.zip
AMDGPU: Move d16 load matching to preprocess step
When matching half of the build_vector to a load, there could still be a hidden dependency on the other half of the build_vector the pattern wouldn't detect. If there was an additional chain dependency on the other value, a cycle could be introduced. I don't think a tablegen pattern is capable of matching the necessary conditions, so move this into PreprocessISelDAG. Check isPredecessorOf for the other value to avoid a cycle. This has a warning that it's expensive, so this should probably be moved into an MI pass eventually that will have more freedom to reorder instructions to help match this. That is currently complicated by the lack of a computeKnownBits type mechanism for the selected function. llvm-svn: 355731
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index 0002e8e51be..91cc44cbd11 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -614,6 +614,10 @@ public:
return getGeneration() >= GFX9;
}
+ bool d16PreservesUnusedBits() const {
+ return hasD16LoadStore() && !isSRAMECCEnabled();
+ }
+
/// Return if most LDS instructions have an m0 use that require m0 to be
/// iniitalized.
bool ldsRequiresM0Init() const {
OpenPOWER on IntegriCloud