From: Tim Northover Date: Fri, 26 Aug 2016 17:46:22 +0000 (+0000) Subject: GlobalISel: mark G_FPEXT legal from float to double. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc1701c7fb91f28096ae4f11629516f05d6c0bc4;p=platform%2Fupstream%2Fllvm.git GlobalISel: mark G_FPEXT legal from float to double. llvm-svn: 279845 --- diff --git a/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp b/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp index ec5f591..0ea8673 100644 --- a/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp +++ b/llvm/lib/Target/AArch64/AArch64MachineLegalizer.cpp @@ -114,6 +114,9 @@ AArch64MachineLegalizer::AArch64MachineLegalizer() { 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); diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir index cb660b7..a7ebc5c 100644 --- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir +++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-ext.mir @@ -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 ...