[llvm] [RISCV] Be more aggressive about forming floating point constants (PR #68433)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 12:25:33 PDT 2023


preames wrote:

Throwing this out there for consideration.  

The vast majority of the vector test diff duplication are for a single double constant: 4503599627370496.  This number happens to be precisely representable as a single precision value as well, and thus we could use the sequence.  LUI + FMV.S.X + FCVT.D.S to form it.  If we preferred this form on both rv32 and rv64, it'd make the test diffs collapse.

Not sure that's a good idea though as the cost of the FMV + FCVT may be higher than the slli + fmv we'd use in this change.  

https://github.com/llvm/llvm-project/pull/68433


More information about the llvm-commits mailing list