[PATCH] D128898: [LoongArch] Add codegen support for handling floating point immediates
Xi Ruoyao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 03:06:42 PDT 2022
xry111 added inline comments.
================
Comment at: llvm/test/CodeGen/LoongArch/double-imm.ll:86
+; LA64-NEXT: movgr2fr.d $fa0, $a0
+; LA64-NEXT: ffint.d.l $fa0, $fa0
+; LA64-NEXT: jirl $zero, $ra, 0
----------------
I'd suggest:
```
lu52i.d $a0, $zero, 0x3ff
movgr2fr.d $fa0, $a0
```
to reduce one instruction. The combination of lu52i.d and movgr2fr.d can always load $2^k$ as a f64 for all integral k in $[0, 1023]$.
But as it's already approved it can be done in a later revision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128898/new/
https://reviews.llvm.org/D128898
More information about the llvm-commits
mailing list