summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2018-03-17 15:17:48 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2018-03-17 15:17:48 +0000
commitabdc4f2dc70c36e6af722c4a4fd8dcfc85248c9d (patch)
tree36a7459e284adf529632d43beeeb0276630bd419 /llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
parent685d1e81577dcbf84eda0923699f58b4fc362379 (diff)
downloadbcm5719-llvm-abdc4f2dc70c36e6af722c4a4fd8dcfc85248c9d.tar.gz
bcm5719-llvm-abdc4f2dc70c36e6af722c4a4fd8dcfc85248c9d.zip
AMDGPU/GlobalISel: Cleanup constant legality
llvm-svn: 327774
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
index 9c8941c2fdc..1199a833ee5 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -66,18 +66,15 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const SISubtarget &ST,
setAction({G_BITCAST, S32}, Legal);
setAction({G_BITCAST, 1, V2S16}, Legal);
+ getActionDefinitionsBuilder(G_FCONSTANT)
+ .legalFor({S32, S64});
+ getActionDefinitionsBuilder({G_IMPLICIT_DEF, G_CONSTANT})
+ .legalFor({S1, S32, S64});
+
// FIXME: i1 operands to intrinsics should always be legal, but other i1
// values may not be legal. We need to figure out how to distinguish
// between these two scenarios.
setAction({G_CONSTANT, S1}, Legal);
- setAction({G_CONSTANT, S32}, Legal);
- setAction({G_CONSTANT, S64}, Legal);
-
- setAction({G_FCONSTANT, S32}, Legal);
- setAction({G_FCONSTANT, S64}, Legal);
-
- setAction({G_IMPLICIT_DEF, S32}, Legal);
- setAction({G_IMPLICIT_DEF, S64}, Legal);
setAction({G_FADD, S32}, Legal);
OpenPOWER on IntegriCloud