[all-commits] [llvm/llvm-project] b50c68: [RISCV] Move fli selection in RISCVISelDAGToDAG.cp...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Mar 21 19:36:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b50c6857a45b8fa753bde44efcea7d0000c55ac5
      https://github.com/llvm/llvm-project/commit/b50c6857a45b8fa753bde44efcea7d0000c55ac5
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td

  Log Message:
  -----------
  [RISCV] Move fli selection in RISCVISelDAGToDAG.cpp. NFC

We custom isel for ConstantFP that has higher priority than isel
patterns. We were previously detecting valid FP constants for fli
to early exit from the custom code. This detection called
getLoadFPImm. Then we would run the isel patterns which would call
getLoadFPImm a second time.

With a little bit more code we can directly select the fli instruction
in the custom handler and avoid a second call.

Remove the incorrect mayRaiseFPException flag from the FLI instructions.

Reviewed By: joshua-arch1

Differential Revision: https://reviews.llvm.org/D146093




More information about the All-commits mailing list