summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-20 18:34:24 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-20 18:34:24 +0000
commit24563ef628075aa5e219f12277ee4db40a9fd7aa (patch)
treebd22f32b39fc4e9ea3cf90109127d654bf478134 /llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
parentb590e4f7e57c7105cd5b0289be8911724e0d7002 (diff)
downloadbcm5719-llvm-24563ef628075aa5e219f12277ee4db40a9fd7aa.tar.gz
bcm5719-llvm-24563ef628075aa5e219f12277ee4db40a9fd7aa.zip
AMDGPU/GlobalISel: Cleanup legality for extensions
llvm-svn: 351691
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
index fcef96599e4..f644a18f1f2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -140,6 +140,10 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST,
getActionDefinitionsBuilder(G_FPTRUNC)
.legalFor({{S32, S64}});
+ getActionDefinitionsBuilder(G_FPEXT)
+ .legalFor({{S64, S32}, {S32, S16}})
+ .lowerFor({{S64, S16}}); // FIXME: Implement
+
// Use actual fsub instruction
setAction({G_FSUB, S32}, Legal);
@@ -150,16 +154,8 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST,
setAction({G_FCMP, 1, S32}, Legal);
setAction({G_FCMP, 1, S64}, Legal);
- setAction({G_ZEXT, S64}, Legal);
- setAction({G_ZEXT, 1, S32}, Legal);
-
- setAction({G_SEXT, S64}, Legal);
- setAction({G_SEXT, 1, S32}, Legal);
-
- setAction({G_ANYEXT, S64}, Legal);
- setAction({G_ANYEXT, S32}, Legal);
- setAction({G_ANYEXT, 1, S32}, Legal);
- setAction({G_ANYEXT, 1, S16}, Legal);
+ getActionDefinitionsBuilder({G_SEXT, G_ZEXT, G_ANYEXT})
+ .legalFor({{S64, S32}, {S32, S16}, {S64, S16}});
setAction({G_FPTOSI, S32}, Legal);
setAction({G_FPTOSI, 1, S32}, Legal);
OpenPOWER on IntegriCloud