Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Hello everyone. @gonglingqin is another engineer from Loongson. Please help to review her patches. Thanks.
llvm/lib/Target/LoongArch/LoongArchFloat64InstrInfo.td | ||
---|---|---|
206–207 | Are we better off handling this by just hard-coding the bit patterns then movgr2fr.w and movgr2frh.w? I don't know the exact latencies for fcvt.d.s but plain moves should be a bit faster. | |
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp | ||
121 | nit: "will be added later" |
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td | ||
---|---|---|
167–174 | Suggest to remove useless blank lines and indent. |
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td | ||
---|---|---|
167–174 | Thanks. I will change that. |
llvm/test/CodeGen/LoongArch/double-imm.ll | ||
---|---|---|
87 | 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. |
llvm/test/CodeGen/LoongArch/double-imm.ll | ||
---|---|---|
87 | Wow that's some serious simplification. I don't think I've seen anything like this recently. Agreed this optimization is better done in a new patch, as it's more of a peephole kind, not deeply related to the generic handling done here. |
llvm/test/CodeGen/LoongArch/double-imm.ll | ||
---|---|---|
87 | Quite nice. Thanks for the suggestion. Let’s implement it in later patch. :) |
Are we better off handling this by just hard-coding the bit patterns then movgr2fr.w and movgr2frh.w? I don't know the exact latencies for fcvt.d.s but plain moves should be a bit faster.