Skip to content

Commit 41ab45d

Browse files
committed
[RISCV] Define vector vfwmul intrinsics.
Define vector vfwmul intrinsics and lower them to V instructions. We work with @rogfer01 from BSC to come out this patch. Authored-by: Roger Ferrer Ibanez <[email protected]> Co-Authored-by: Hsiangkai Wang <[email protected]> Differential Revision: https://reviews.llvm.org/D93584
1 parent f86e61d commit 41ab45d

File tree

4 files changed

+1134
-0
lines changed

4 files changed

+1134
-0
lines changed

llvm/include/llvm/IR/IntrinsicsRISCV.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,8 @@ let TargetPrefix = "riscv" in {
423423
defm vfdiv : RISCVBinaryAAX;
424424
defm vfrdiv : RISCVBinaryAAX;
425425

426+
defm vfwmul : RISCVBinaryABX;
427+
426428
defm vfsgnj : RISCVBinaryAAX;
427429
defm vfsgnjn : RISCVBinaryAAX;
428430
defm vfsgnjx : RISCVBinaryAAX;

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,11 @@ defm PseudoVFMUL : VPseudoBinaryV_VV_VX</*IsFloat=*/1>;
15431543
defm PseudoVFDIV : VPseudoBinaryV_VV_VX</*IsFloat=*/1>;
15441544
defm PseudoVFRDIV : VPseudoBinaryV_VX</*IsFloat=*/1>;
15451545

1546+
//===----------------------------------------------------------------------===//
1547+
// 14.5. Vector Widening Floating-Point Multiply
1548+
//===----------------------------------------------------------------------===//
1549+
defm PseudoVFWMUL : VPseudoBinaryW_VV_VX</*IsFloat=*/1>;
1550+
15461551
//===----------------------------------------------------------------------===//
15471552
// 14.12. Vector Floating-Point Sign-Injection Instructions
15481553
//===----------------------------------------------------------------------===//
@@ -1829,6 +1834,11 @@ defm "" : VPatBinaryV_VV_VX<"int_riscv_vfmul", "PseudoVFMUL", AllFloatVectors>;
18291834
defm "" : VPatBinaryV_VV_VX<"int_riscv_vfdiv", "PseudoVFDIV", AllFloatVectors>;
18301835
defm "" : VPatBinaryV_VX<"int_riscv_vfrdiv", "PseudoVFRDIV", AllFloatVectors>;
18311836

1837+
//===----------------------------------------------------------------------===//
1838+
// 14.5. Vector Widening Floating-Point Multiply
1839+
//===----------------------------------------------------------------------===//
1840+
defm "" : VPatBinaryW_VV_VX<"int_riscv_vfwmul", "PseudoVFWMUL", AllWidenableFloatVectors>;
1841+
18321842
//===----------------------------------------------------------------------===//
18331843
// 14.12. Vector Floating-Point Sign-Injection Instructions
18341844
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)