-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV] Remove support for vfmv.v.f with bf16 type. #95352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This isn't used by clang and isn't in the rvv-intrinsic-doc. The instruction requires Zvfh. If the F register passed to the instruction isn't nan-boxed correctly, the instruction will generate the wrong nan. So the instruction isn't a generic move FPR16 to vector instruction.
@llvm/pr-subscribers-backend-risc-v Author: Craig Topper (topperc) ChangesThis isn't used by clang and isn't in the rvv-intrinsic-doc. The instruction requires Zvfh. If the F register passed to the instruction isn't nan-boxed correctly, the instruction will generate the wrong nan. So the instruction isn't a generic move FPR16 to vector register instruction. Full diff: https://github.com/llvm/llvm-project/pull/95352.diff 2 Files Affected:
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
index 70d8265e7be46..9fff89d3092b3 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
@@ -2653,7 +2653,7 @@ foreach fvti = !listconcat(AllFloatVectors, AllBFloatVectors) in {
}
}
-foreach fvti = !listconcat(AllFloatVectors, AllBFloatVectors) in {
+foreach fvti = AllFloatVectors in {
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
GetVTypeScalarPredicates<fvti>.Predicates) in {
// 13.16. Vector Floating-Point Move Instruction
diff --git a/llvm/test/CodeGen/RISCV/rvv/vfmv.v.f.ll b/llvm/test/CodeGen/RISCV/rvv/vfmv.v.f.ll
index c00433eba5481..81dc78ba9e050 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vfmv.v.f.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vfmv.v.f.ll
@@ -528,123 +528,3 @@ entry:
ret <vscale x 8 x double> %a
}
-
-declare <vscale x 1 x bfloat> @llvm.riscv.vfmv.v.f.nxv1bf16(
- <vscale x 1 x bfloat>,
- bfloat,
- iXLen);
-
-define <vscale x 1 x bfloat> @intrinsic_vfmv.v.f_f_nxv1bf16(bfloat %0, iXLen %1) nounwind {
-; CHECK-LABEL: intrinsic_vfmv.v.f_f_nxv1bf16:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
-; CHECK-NEXT: vfmv.v.f v8, fa0
-; CHECK-NEXT: ret
-entry:
- %a = call <vscale x 1 x bfloat> @llvm.riscv.vfmv.v.f.nxv1bf16(
- <vscale x 1 x bfloat> undef,
- bfloat %0,
- iXLen %1)
-
- ret <vscale x 1 x bfloat> %a
-}
-
-declare <vscale x 2 x bfloat> @llvm.riscv.vfmv.v.f.nxv2bf16(
- <vscale x 2 x bfloat>,
- bfloat,
- iXLen);
-
-define <vscale x 2 x bfloat> @intrinsic_vfmv.v.f_f_nxv2bf16(bfloat %0, iXLen %1) nounwind {
-; CHECK-LABEL: intrinsic_vfmv.v.f_f_nxv2bf16:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
-; CHECK-NEXT: vfmv.v.f v8, fa0
-; CHECK-NEXT: ret
-entry:
- %a = call <vscale x 2 x bfloat> @llvm.riscv.vfmv.v.f.nxv2bf16(
- <vscale x 2 x bfloat> undef,
- bfloat %0,
- iXLen %1)
-
- ret <vscale x 2 x bfloat> %a
-}
-
-declare <vscale x 4 x bfloat> @llvm.riscv.vfmv.v.f.nxv4bf16(
- <vscale x 4 x bfloat>,
- bfloat,
- iXLen);
-
-define <vscale x 4 x bfloat> @intrinsic_vfmv.v.f_f_nxv4bf16(bfloat %0, iXLen %1) nounwind {
-; CHECK-LABEL: intrinsic_vfmv.v.f_f_nxv4bf16:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
-; CHECK-NEXT: vfmv.v.f v8, fa0
-; CHECK-NEXT: ret
-entry:
- %a = call <vscale x 4 x bfloat> @llvm.riscv.vfmv.v.f.nxv4bf16(
- <vscale x 4 x bfloat> undef,
- bfloat %0,
- iXLen %1)
-
- ret <vscale x 4 x bfloat> %a
-}
-
-declare <vscale x 8 x bfloat> @llvm.riscv.vfmv.v.f.nxv8bf16(
- <vscale x 8 x bfloat>,
- bfloat,
- iXLen);
-
-define <vscale x 8 x bfloat> @intrinsic_vfmv.v.f_f_nxv8bf16(bfloat %0, iXLen %1) nounwind {
-; CHECK-LABEL: intrinsic_vfmv.v.f_f_nxv8bf16:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
-; CHECK-NEXT: vfmv.v.f v8, fa0
-; CHECK-NEXT: ret
-entry:
- %a = call <vscale x 8 x bfloat> @llvm.riscv.vfmv.v.f.nxv8bf16(
- <vscale x 8 x bfloat> undef,
- bfloat %0,
- iXLen %1)
-
- ret <vscale x 8 x bfloat> %a
-}
-
-declare <vscale x 16 x bfloat> @llvm.riscv.vfmv.v.f.nxv16bf16(
- <vscale x 16 x bfloat>,
- bfloat,
- iXLen);
-
-define <vscale x 16 x bfloat> @intrinsic_vfmv.v.f_f_nxv16bf16(bfloat %0, iXLen %1) nounwind {
-; CHECK-LABEL: intrinsic_vfmv.v.f_f_nxv16bf16:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
-; CHECK-NEXT: vfmv.v.f v8, fa0
-; CHECK-NEXT: ret
-entry:
- %a = call <vscale x 16 x bfloat> @llvm.riscv.vfmv.v.f.nxv16bf16(
- <vscale x 16 x bfloat> undef,
- bfloat %0,
- iXLen %1)
-
- ret <vscale x 16 x bfloat> %a
-}
-
-declare <vscale x 32 x bfloat> @llvm.riscv.vfmv.v.f.nxv32bf16(
- <vscale x 32 x bfloat>,
- bfloat,
- iXLen);
-
-define <vscale x 32 x bfloat> @intrinsic_vfmv.v.f_f_nxv32bf16(bfloat %0, iXLen %1) nounwind {
-; CHECK-LABEL: intrinsic_vfmv.v.f_f_nxv32bf16:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
-; CHECK-NEXT: vfmv.v.f v8, fa0
-; CHECK-NEXT: ret
-entry:
- %a = call <vscale x 32 x bfloat> @llvm.riscv.vfmv.v.f.nxv32bf16(
- <vscale x 32 x bfloat> undef,
- bfloat %0,
- iXLen %1)
-
- ret <vscale x 32 x bfloat> %a
-}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This isn't used by clang and isn't in the rvv-intrinsic-doc. The instruction requires Zvfh. If the F register passed to the instruction isn't nan-boxed correctly, the instruction will generate the wrong nan. So the instruction isn't a generic move FPR16 to vector register instruction.
This isn't used by clang and isn't in the rvv-intrinsic-doc.
The instruction requires Zvfh.
If the F register passed to the instruction isn't nan-boxed correctly, the instruction will generate the wrong nan. So the instruction isn't a generic move FPR16 to vector register instruction.