Skip to content

Commit f873f1e

Browse files
Add vfrec7.v
Signed-off-by: Mikhail R. Gadelha <[email protected]>
1 parent 21c4fbd commit f873f1e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,8 @@ static bool isSupportedInstr(const MachineInstr &MI) {
11031103
case RISCV::VFSQRT_V:
11041104
// Vector Floating-Point Reciprocal Square-Root Estimate Instruction
11051105
case RISCV::VFRSQRT7_V:
1106+
// Vector Floating-Point Reciprocal Estimate Instruction
1107+
case RISCV::VFREC7_V:
11061108
// Vector Floating-Point MIN/MAX Instructions
11071109
case RISCV::VFMIN_VF:
11081110
case RISCV::VFMIN_VV:

llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5338,12 +5338,11 @@ define <vscale x 4 x double> @vfrec7(<vscale x 4 x float> %a) {
53385338
;
53395339
; VLOPT-LABEL: vfrec7:
53405340
; VLOPT: # %bb.0:
5341-
; VLOPT-NEXT: vsetivli zero, 7, e32, m2, ta, ma
5341+
; VLOPT-NEXT: vsetivli zero, 6, e32, m2, ta, ma
53425342
; VLOPT-NEXT: vmv2r.v v12, v8
53435343
; VLOPT-NEXT: fsrmi a0, 0
53445344
; VLOPT-NEXT: vfrec7.v v14, v8
53455345
; VLOPT-NEXT: fsrm a0
5346-
; VLOPT-NEXT: vsetivli zero, 6, e32, m2, ta, ma
53475346
; VLOPT-NEXT: vfwmacc.vv v8, v12, v14
53485347
; VLOPT-NEXT: ret
53495348
%1 = call <vscale x 4 x float> @llvm.riscv.vfrec7.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %a, iXLen 0, iXLen 7)

0 commit comments

Comments
 (0)