diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-01-23 21:10:14 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-01-23 21:10:14 +0000 |
| commit | b6137063ebda8a99f6b6f7c0c94b1cd3ad1c67d4 (patch) | |
| tree | ac733a55e82ed71c51dd7535b23e5fc72dfc6e3d /llvm/test/CodeGen | |
| parent | cfb384d39d09e4bf4e79bb0436c25e77f5d4b063 (diff) | |
| download | bcm5719-llvm-b6137063ebda8a99f6b6f7c0c94b1cd3ad1c67d4.tar.gz bcm5719-llvm-b6137063ebda8a99f6b6f7c0c94b1cd3ad1c67d4.zip | |
[AArch64][GlobalISel] Legalize narrow scalar fp->int conversions.
Since we're now avoiding operations using narrow scalar integer types,
we have to legalize the integer side of the FP conversions.
This requires teaching the legalizer how to do that.
llvm-svn: 292828
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir index 968256c7424..8d0af0dc447 100644 --- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir +++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir @@ -130,7 +130,8 @@ body: | %0:_(s32) = COPY %w0 ; CHECK-LABEL: name: test_fptosi_s1_s32 - ; CHECK: %1(s1) = G_FPTOSI %0 + ; CHECK: %2(s32) = G_FPTOSI %0 + ; CHECK: %1(s1) = G_TRUNC %2 %1:_(s1) = G_FPTOSI %0 ... @@ -142,7 +143,8 @@ body: | %0:_(s32) = COPY %w0 ; CHECK-LABEL: name: test_fptoui_s1_s32 - ; CHECK: %1(s1) = G_FPTOUI %0 + ; CHECK: %2(s32) = G_FPTOUI %0 + ; CHECK: %1(s1) = G_TRUNC %2 %1:_(s1) = G_FPTOUI %0 ... @@ -154,7 +156,8 @@ body: | %0:_(s64) = COPY %x0 ; CHECK-LABEL: name: test_fptosi_s8_s64 - ; CHECK: %1(s8) = G_FPTOSI %0 + ; CHECK: %2(s32) = G_FPTOSI %0 + ; CHECK: %1(s8) = G_TRUNC %2 %1:_(s8) = G_FPTOSI %0 ... @@ -166,7 +169,8 @@ body: | %0:_(s64) = COPY %x0 ; CHECK-LABEL: name: test_fptoui_s8_s64 - ; CHECK: %1(s8) = G_FPTOUI %0 + ; CHECK: %2(s32) = G_FPTOUI %0 + ; CHECK: %1(s8) = G_TRUNC %2 %1:_(s8) = G_FPTOUI %0 ... @@ -178,7 +182,8 @@ body: | %0:_(s32) = COPY %w0 ; CHECK-LABEL: name: test_fptosi_s16_s32 - ; CHECK: %1(s16) = G_FPTOSI %0 + ; CHECK: %2(s32) = G_FPTOSI %0 + ; CHECK: %1(s16) = G_TRUNC %2 %1:_(s16) = G_FPTOSI %0 ... @@ -190,6 +195,7 @@ body: | %0:_(s32) = COPY %w0 ; CHECK-LABEL: name: test_fptoui_s16_s32 - ; CHECK: %1(s16) = G_FPTOUI %0 + ; CHECK: %2(s32) = G_FPTOUI %0 + ; CHECK: %1(s16) = G_TRUNC %2 %1:_(s16) = G_FPTOUI %0 ... |

