diff options
| author | Petar Avramovic <Petar.Avramovic@rt-rk.com> | 2019-06-20 09:05:02 +0000 |
|---|---|---|
| committer | Petar Avramovic <Petar.Avramovic@rt-rk.com> | 2019-06-20 09:05:02 +0000 |
| commit | 153bd24eda1f4f471d9e2eebad195ed49668c6a8 (patch) | |
| tree | ec0f73025847978ec5cb65144bc9e3fea80d52e9 /llvm/lib/CodeGen | |
| parent | 4b4dae1c768d017604149fc0fa0aa854e796c0e1 (diff) | |
| download | bcm5719-llvm-153bd24eda1f4f471d9e2eebad195ed49668c6a8.tar.gz bcm5719-llvm-153bd24eda1f4f471d9e2eebad195ed49668c6a8.zip | |
[MIPS GlobalISel] Select integer to floating point conversions
Select G_SITOFP and G_UITOFP for MIPS32.
Differential Revision: https://reviews.llvm.org/D63542
llvm-svn: 363912
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index e2b0fb753e9..d153a35ded4 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp @@ -435,12 +435,12 @@ LegalizerHelper::libcall(MachineInstr &MI) { // FIXME: Support other types unsigned FromSize = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits(); unsigned ToSize = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits(); - if (FromSize != 32 || (ToSize != 32 && ToSize != 64)) + if ((FromSize != 32 && FromSize != 64) || (ToSize != 32 && ToSize != 64)) return UnableToLegalize; LegalizeResult Status = conversionLibcall( MI, MIRBuilder, ToSize == 64 ? Type::getDoubleTy(Ctx) : Type::getFloatTy(Ctx), - Type::getInt32Ty(Ctx)); + FromSize == 32 ? Type::getInt32Ty(Ctx) : Type::getInt64Ty(Ctx)); if (Status != Legalized) return Status; break; |

