[llvm] r326481 - AMDGPU/GlobalISel: Mark i32->i64 zext as legal
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 1 12:56:21 PST 2018
Author: arsenm
Date: Thu Mar 1 12:56:21 2018
New Revision: 326481
URL: http://llvm.org/viewvc/llvm-project?rev=326481&view=rev
Log:
AMDGPU/GlobalISel: Mark i32->i64 zext as legal
Added:
llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-zext.mir
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp?rev=326481&r1=326480&r2=326481&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp Thu Mar 1 12:56:21 2018
@@ -66,6 +66,9 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo
setAction({G_FMUL, S32}, Legal);
+ setAction({G_ZEXT, S64}, Legal);
+ setAction({G_ZEXT, 1, S32}, Legal);
+
setAction({G_FPTOSI, S32}, Legal);
setAction({G_FPTOSI, 1, S32}, Legal);
Added: llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-zext.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-zext.mir?rev=326481&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-zext.mir (added)
+++ llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-zext.mir Thu Mar 1 12:56:21 2018
@@ -0,0 +1,14 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -global-isel %s -o - | FileCheck %s
+
+---
+name: test_zext_i32_to_i64
+body: |
+ bb.0.entry:
+ liveins: $vgpr0
+
+ ; CHECK-LABEL: name: test_zext_i32_to_i64
+ ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
+ %0:_(s32) = COPY $vgpr0
+ %1:_(s64) = G_ZEXT %0
+...
More information about the llvm-commits
mailing list