Index: llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td =================================================================== --- llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td +++ llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td @@ -195,15 +195,15 @@ // frint rounds according to the current rounding mode and detects // inexact conditions. -def: Pat<(any_frint FPR32 : $rs1), (FROUNDNX_S FPR32 : $rs1, 0b111)>; +def: Pat<(any_frint FPR32: $rs1), (FROUNDNX_S FPR32: $rs1, 0b111)>; // fnearbyint is like frint but does not detect inexact conditions. -def: Pat<(any_fnearbyint FPR32 : $rs1), (FROUND_S FPR32 : $rs1, 0b111)>; +def: Pat<(any_fnearbyint FPR32: $rs1), (FROUND_S FPR32: $rs1, 0b111)>; -def: Pat<(any_fround FPR32 : $rs1), (FROUND_S FPR32 : $rs1, 0b100)>; -def: Pat<(any_ffloor FPR32 : $rs1), (FROUND_S FPR32 : $rs1, 0b011)>; -def: Pat<(any_fceil FPR32 : $rs1), (FROUND_S FPR32 : $rs1, 0b010)>; -def: Pat<(any_ftrunc FPR32 : $rs1), (FROUND_S FPR32 : $rs1, 0b001)>; +def: Pat<(any_fround FPR32: $rs1), (FROUND_S FPR32: $rs1, 0b100)>; +def: Pat<(any_ffloor FPR32: $rs1), (FROUND_S FPR32: $rs1, 0b010)>; +def: Pat<(any_fceil FPR32: $rs1), (FROUND_S FPR32: $rs1, 0b011)>; +def: Pat<(any_ftrunc FPR32: $rs1), (FROUND_S FPR32: $rs1, 0b001)>; def: PatSetCC; def: PatSetCC; @@ -219,16 +219,16 @@ // frint rounds according to the current rounding mode and detects // inexact conditions. -def: Pat<(any_frint FPR64 : $rs1), (FROUNDNX_D FPR64 : $rs1, 0b111)>; +def: Pat<(any_frint FPR64: $rs1), (FROUNDNX_D FPR64: $rs1, 0b111)>; // fnearbyint is like frint but does not detect inexact conditions. -def: Pat<(any_fnearbyint FPR64 : $rs1), (FROUND_D FPR64 : $rs1, 0b111)>; +def: Pat<(any_fnearbyint FPR64: $rs1), (FROUND_D FPR64: $rs1, 0b111)>; -def: Pat<(any_fround FPR64 : $rs1), (FROUND_D FPR64 : $rs1, 0b100)>; -def: Pat<(any_froundeven FPR64 : $rs1), (FROUND_D FPR64 : $rs1, 0b000)>; -def: Pat<(any_ffloor FPR64 : $rs1), (FROUND_D FPR64 : $rs1, 0b011)>; -def: Pat<(any_fceil FPR64 : $rs1), (FROUND_D FPR64 : $rs1, 0b010)>; -def: Pat<(any_ftrunc FPR64 : $rs1), (FROUND_D FPR64 : $rs1, 0b001)>; +def: Pat<(any_fround FPR64: $rs1), (FROUND_D FPR64: $rs1, 0b100)>; +def: Pat<(any_froundeven FPR64: $rs1), (FROUND_D FPR64: $rs1, 0b000)>; +def: Pat<(any_ffloor FPR64: $rs1), (FROUND_D FPR64: $rs1, 0b010)>; +def: Pat<(any_fceil FPR64: $rs1), (FROUND_D FPR64: $rs1, 0b011)>; +def: Pat<(any_ftrunc FPR64: $rs1), (FROUND_D FPR64: $rs1, 0b001)>; def: PatSetCC; def: PatSetCC; @@ -249,16 +249,16 @@ // frint rounds according to the current rounding mode and detects // inexact conditions. -def: Pat<(any_frint FPR16 : $rs1), (FROUNDNX_H FPR16 : $rs1, 0b111)>; +def: Pat<(any_frint FPR16: $rs1), (FROUNDNX_H FPR16: $rs1, 0b111)>; // fnearbyint is like frint but does not detect inexact conditions. -def: Pat<(any_fnearbyint FPR16 : $rs1), (FROUND_H FPR16 : $rs1, 0b111)>; +def: Pat<(any_fnearbyint FPR16: $rs1), (FROUND_H FPR16: $rs1, 0b111)>; -def: Pat<(any_fround FPR16 : $rs1), (FROUND_H FPR16 : $rs1, 0b100)>; -def: Pat<(any_froundeven FPR16 : $rs1), (FROUND_H FPR16 : $rs1, 0b000)>; -def: Pat<(any_ffloor FPR16 : $rs1), (FROUND_H FPR16 : $rs1, 0b011)>; -def: Pat<(any_fceil FPR16 : $rs1), (FROUND_H FPR16 : $rs1, 0b010)>; -def: Pat<(any_ftrunc FPR16 : $rs1), (FROUND_H FPR16 : $rs1, 0b001)>; +def: Pat<(any_fround FPR16: $rs1), (FROUND_H FPR16: $rs1, 0b100)>; +def: Pat<(any_froundeven FPR16: $rs1), (FROUND_H FPR16: $rs1, 0b000)>; +def: Pat<(any_ffloor FPR16: $rs1), (FROUND_H FPR16: $rs1, 0b010)>; +def: Pat<(any_fceil FPR16: $rs1), (FROUND_H FPR16: $rs1, 0b011)>; +def: Pat<(any_ftrunc FPR16: $rs1), (FROUND_H FPR16: $rs1, 0b001)>; def: PatSetCC; def: PatSetCC; Index: llvm/test/CodeGen/RISCV/double-zfa.ll =================================================================== --- llvm/test/CodeGen/RISCV/double-zfa.ll +++ llvm/test/CodeGen/RISCV/double-zfa.ll @@ -170,7 +170,7 @@ define double @fround_d_2(double %a) nounwind { ; CHECK-LABEL: fround_d_2: ; CHECK: # %bb.0: -; CHECK-NEXT: fround.d fa0, fa0, rup +; CHECK-NEXT: fround.d fa0, fa0, rdn ; CHECK-NEXT: ret %call = tail call double @floor(double %a) nounwind readnone ret double %call @@ -182,7 +182,7 @@ define double @fround_d_3(double %a) nounwind { ; CHECK-LABEL: fround_d_3: ; CHECK: # %bb.0: -; CHECK-NEXT: fround.d fa0, fa0, rdn +; CHECK-NEXT: fround.d fa0, fa0, rup ; CHECK-NEXT: ret %call = tail call double @ceil(double %a) nounwind readnone ret double %call Index: llvm/test/CodeGen/RISCV/float-zfa.ll =================================================================== --- llvm/test/CodeGen/RISCV/float-zfa.ll +++ llvm/test/CodeGen/RISCV/float-zfa.ll @@ -125,7 +125,7 @@ define float @fround_s_2(float %a) nounwind { ; CHECK-LABEL: fround_s_2: ; CHECK: # %bb.0: -; CHECK-NEXT: fround.s fa0, fa0, rup +; CHECK-NEXT: fround.s fa0, fa0, rdn ; CHECK-NEXT: ret %call = tail call float @floorf(float %a) nounwind readnone ret float %call @@ -137,7 +137,7 @@ define float @fround_s_3(float %a) nounwind { ; CHECK-LABEL: fround_s_3: ; CHECK: # %bb.0: -; CHECK-NEXT: fround.s fa0, fa0, rdn +; CHECK-NEXT: fround.s fa0, fa0, rup ; CHECK-NEXT: ret %call = tail call float @ceilf(float %a) nounwind readnone ret float %call Index: llvm/test/CodeGen/RISCV/half-zfa.ll =================================================================== --- llvm/test/CodeGen/RISCV/half-zfa.ll +++ llvm/test/CodeGen/RISCV/half-zfa.ll @@ -41,7 +41,7 @@ define half @fround_h_2(half %a) nounwind { ; CHECK-LABEL: fround_h_2: ; CHECK: # %bb.0: -; CHECK-NEXT: fround.h fa0, fa0, rup +; CHECK-NEXT: fround.h fa0, fa0, rdn ; CHECK-NEXT: ret %call = tail call half @llvm.floor.f16(half %a) nounwind readnone ret half %call @@ -53,7 +53,7 @@ define half @fround_h_3(half %a) nounwind { ; CHECK-LABEL: fround_h_3: ; CHECK: # %bb.0: -; CHECK-NEXT: fround.h fa0, fa0, rdn +; CHECK-NEXT: fround.h fa0, fa0, rup ; CHECK-NEXT: ret %call = tail call half @llvm.ceil.f16(half %a) nounwind readnone ret half %call