diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-01-20 01:37:24 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-01-20 01:37:24 +0000 |
commit | d294823930f4815eab824ae56ca7e6d9b1e8134c (patch) | |
tree | 6e4c0d4e89f24d446778672b68e28f10b149fad2 /llvm/test | |
parent | 7eb7507aeb3552400c8a1f4dc82bb2212260c0da (diff) | |
download | bcm5719-llvm-d294823930f4815eab824ae56ca7e6d9b1e8134c.tar.gz bcm5719-llvm-d294823930f4815eab824ae56ca7e6d9b1e8134c.zip |
[AArch64][GlobalISel] Widen scalar int->fp conversions.
It's incorrect to ignore the higher bits of the integer source.
Teach the legalizer how to widen it.
llvm-svn: 292563
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir index 176a7afefce..70ffc3ea3ac 100644 --- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir +++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir @@ -130,7 +130,8 @@ body: | %1:_(s1) = G_TRUNC %0 ; CHECK-LABEL: name: test_sitofp_s32_s1 - ; CHECK: %2(s32) = G_SITOFP %1 + ; CHECK: %3(s32) = G_SEXT %1 + ; CHECK: %2(s32) = G_SITOFP %3 %2:_(s32) = G_SITOFP %1 ... @@ -143,7 +144,8 @@ body: | %1:_(s1) = G_TRUNC %0 ; CHECK-LABEL: name: test_uitofp_s32_s1 - ; CHECK: %2(s32) = G_UITOFP %1 + ; CHECK: %3(s32) = G_ZEXT %1 + ; CHECK: %2(s32) = G_UITOFP %3 %2:_(s32) = G_UITOFP %1 ... @@ -156,7 +158,8 @@ body: | %1:_(s8) = G_TRUNC %0 ; CHECK-LABEL: name: test_sitofp_s64_s8 - ; CHECK: %2(s64) = G_SITOFP %1 + ; CHECK: %3(s32) = G_SEXT %1 + ; CHECK: %2(s64) = G_SITOFP %3 %2:_(s64) = G_SITOFP %1 ... @@ -169,7 +172,8 @@ body: | %1:_(s8) = G_TRUNC %0 ; CHECK-LABEL: name: test_uitofp_s64_s8 - ; CHECK: %2(s64) = G_UITOFP %1 + ; CHECK: %3(s32) = G_ZEXT %1 + ; CHECK: %2(s64) = G_UITOFP %3 %2:_(s64) = G_UITOFP %1 ... @@ -182,7 +186,8 @@ body: | %1:_(s16) = G_TRUNC %0 ; CHECK-LABEL: name: test_sitofp_s32_s16 - ; CHECK: %2(s32) = G_SITOFP %1 + ; CHECK: %3(s32) = G_SEXT %1 + ; CHECK: %2(s32) = G_SITOFP %3 %2:_(s32) = G_SITOFP %1 ... @@ -195,6 +200,7 @@ body: | %1:_(s16) = G_TRUNC %0 ; CHECK-LABEL: name: test_uitofp_s32_s16 - ; CHECK: %2(s32) = G_UITOFP %1 + ; CHECK: %3(s32) = G_ZEXT %1 + ; CHECK: %2(s32) = G_UITOFP %3 %2:_(s32) = G_UITOFP %1 ... |