[PATCH] D141560: [RISCV][CodeGen] Add codegen pattern for FLI instruction in experimental zfa extension

Jun Sha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 02:19:18 PDT 2023

joshua-arch1 added a comment.

> Maybe, but it will probably be microarchitecture dependent.
> Delaying a store by an extra cycle doesn't seem like a big deal. Other instructions don't directly depend on a store except later loads. The compiler would often be able to see the load is to the same location as the store and forward the data without the load.
> If we're storing the same value in a loop we should be hoisting the 2 integer instructions out of the loop. So they wouldn't be executed many times.

Even if we disable replaceStoreOfFPConstant in DAGCombiner, FP constant will still be converted to integer in OptimizeFloatStore() when legalizing.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list