[llvm] r279845 - GlobalISel: mark G_FPEXT legal from float to double.
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 10:46:22 PDT 2016
Author: tnorthover
Date: Fri Aug 26 12:46:22 2016
New Revision: 279845
URL: http://llvm.org/viewvc/llvm-project?rev=279845&view=rev
Log:
GlobalISel: mark G_FPEXT legal from float to double.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp
llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir
Modified: llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp?rev=279845&r1=279844&r2=279845&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64MachineLegalizer.cpp Fri Aug 26 12:46:22 2016
@@ -114,6 +114,9 @@ AArch64MachineLegalizer::AArch64MachineL
setAction({G_ANYEXT, 1, Ty}, Legal);
}
+ setAction({G_FPEXT, s64}, Legal);
+ setAction({G_FPEXT, 1, s32}, Legal);
+
// Truncations
for (auto Ty : { s16, s32 })
setAction({G_FPTRUNC, Ty}, Legal);
Modified: llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir?rev=279845&r1=279844&r2=279845&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir (original)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir Fri Aug 26 12:46:22 2016
@@ -29,6 +29,8 @@ registers:
- { id: 14, class: _ }
- { id: 15, class: _ }
- { id: 16, class: _ }
+ - { id: 17, class: _ }
+ - { id: 18, class: _ }
body: |
bb.0.entry:
liveins: %x0, %x1, %x2, %x3
@@ -70,4 +72,8 @@ body: |
; CHECK: %16(16) = G_ANYEXT { s16, s8 } %2
%15(8) = G_ZEXT { s8, s1 } %1
%16(16) = G_ANYEXT { s16, s8 } %2
+
+ ; CHECK: %18(64) = G_FPEXT { s64, s32 } %17
+ %17(32) = G_TRUNC { s32, s64 } %0
+ %18(64) = G_FPEXT { s64, s32 } %17
...
More information about the llvm-commits
mailing list