[PATCH] D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer

Gong LingQin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 20:30:30 PDT 2022


gonglingqin added a comment.

In D129715#3681358 <https://reviews.llvm.org/D129715#3681358>, @xry111 wrote:

> In D129715#3681339 <https://reviews.llvm.org/D129715#3681339>, @gonglingqin wrote:
>
>> I used `cpu2017(fortran excluded)` to test the performance in 5 cases,
>>
>> 1. using constant pool,
>> 2. materialized integer with 1 instruction,
>> 3. materialized integer within 2 instructions,
>> 4. materialized integer within 3 instructions,
>> 5. materialized integer within 4 instructions.
>>
>> (Tests were run three times for each condition and the scores were geometrically averaged). 
>> The results showed no change in the scores for the 5 cases. @xen0n, @xry111, do you have any suggestions?
>
> Make it a tunable (`-loongarch-materialize-float-imm=0/1/2/3/4`, or some better name), I guess.  And set the default to `0` for `-mtune=generic` or `-mtune=la464`.  Then we can set it to other values if a future uarch behaves differently.

Good suggestion! Thanks! If others agree with this opinion, I will implement it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129715/new/

https://reviews.llvm.org/D129715



More information about the llvm-commits mailing list