Skip to content

Commit

Permalink
[RISCV][NFC] Remove Duplicated F Extension Patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
lenary committed Apr 30, 2020
1 parent 7e4c26b commit 09f6b97
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions llvm/lib/Target/RISCV/RISCVInstrInfoF.td
Expand Up @@ -394,16 +394,6 @@ def : Pat<(sint_to_fp GPR:$rs1), (FCVT_S_W $rs1, 0b111)>;
def : Pat<(uint_to_fp GPR:$rs1), (FCVT_S_WU $rs1, 0b111)>;
} // Predicates = [HasStdExtF, IsRV32]

let Predicates = [HasStdExtF, IsRV32] in {
// FP->[u]int. Round-to-zero must be used
def : Pat<(fp_to_sint FPR32:$rs1), (FCVT_W_S $rs1, 0b001)>;
def : Pat<(fp_to_uint FPR32:$rs1), (FCVT_WU_S $rs1, 0b001)>;

// [u]int->fp. Match GCC and default to using dynamic rounding mode.
def : Pat<(sint_to_fp GPR:$rs1), (FCVT_S_W $rs1, 0b111)>;
def : Pat<(uint_to_fp GPR:$rs1), (FCVT_S_WU $rs1, 0b111)>;
} // Predicates = [HasStdExtF, IsRV32]

let Predicates = [HasStdExtF, IsRV64] in {
def : Pat<(riscv_fmv_w_x_rv64 GPR:$src), (FMV_W_X GPR:$src)>;
def : Pat<(riscv_fmv_x_anyextw_rv64 FPR32:$src), (FMV_X_W FPR32:$src)>;
Expand Down

0 comments on commit 09f6b97

Please sign in to comment.