[llvm] [RISCV] Remove zfbfmin.ll. NFC (PR #106937)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 1 21:42:35 PDT 2024
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/106937
Most of it is redundant with bfloat-convert.ll. One testcase is found in bfloat-imm. The load and stores are more thoroughly tested in bfloat-mem.ll.
>From a4ecc36450fd932e003e3504c564cb152ae0dd33 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Sun, 1 Sep 2024 21:38:07 -0700
Subject: [PATCH] [RISCV] Remove zfbfmin.ll. NFC
Most of it is redundant with bfloat-convert.ll. One testcase is found
in bfloat-imm. The load and stores are more thoroughly tested in
bfloat-mem.ll.
---
llvm/test/CodeGen/RISCV/zfbfmin.ll | 92 ------------------------------
1 file changed, 92 deletions(-)
delete mode 100644 llvm/test/CodeGen/RISCV/zfbfmin.ll
diff --git a/llvm/test/CodeGen/RISCV/zfbfmin.ll b/llvm/test/CodeGen/RISCV/zfbfmin.ll
deleted file mode 100644
index f120185bbec003..00000000000000
--- a/llvm/test/CodeGen/RISCV/zfbfmin.ll
+++ /dev/null
@@ -1,92 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zfbfmin -verify-machineinstrs \
-; RUN: -target-abi ilp32d < %s | FileCheck -check-prefix=CHECKIZFBFMIN %s
-; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zfbfmin -verify-machineinstrs \
-; RUN: -target-abi lp64d < %s | FileCheck -check-prefix=CHECKIZFBFMIN %s
-
-define bfloat @bitcast_bf16_i16(i16 %a) nounwind {
-; CHECKIZFBFMIN-LABEL: bitcast_bf16_i16:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fmv.h.x fa0, a0
-; CHECKIZFBFMIN-NEXT: ret
- %1 = bitcast i16 %a to bfloat
- ret bfloat %1
-}
-
-define i16 @bitcast_i16_bf16(bfloat %a) nounwind {
-; CHECKIZFBFMIN-LABEL: bitcast_i16_bf16:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fmv.x.h a0, fa0
-; CHECKIZFBFMIN-NEXT: ret
- %1 = bitcast bfloat %a to i16
- ret i16 %1
-}
-
-define bfloat @fcvt_bf16_s(float %a) nounwind {
-; CHECKIZFBFMIN-LABEL: fcvt_bf16_s:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fcvt.bf16.s fa0, fa0
-; CHECKIZFBFMIN-NEXT: ret
- %1 = fptrunc float %a to bfloat
- ret bfloat %1
-}
-
-define float @fcvt_s_bf16(bfloat %a) nounwind {
-; CHECKIZFBFMIN-LABEL: fcvt_s_bf16:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fcvt.s.bf16 fa0, fa0
-; CHECKIZFBFMIN-NEXT: ret
- %1 = fpext bfloat %a to float
- ret float %1
-}
-
-define bfloat @fcvt_bf16_d(double %a) nounwind {
-; CHECKIZFBFMIN-LABEL: fcvt_bf16_d:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fcvt.s.d fa5, fa0
-; CHECKIZFBFMIN-NEXT: fcvt.bf16.s fa0, fa5
-; CHECKIZFBFMIN-NEXT: ret
- %1 = fptrunc double %a to bfloat
- ret bfloat %1
-}
-
-define double @fcvt_d_bf16(bfloat %a) nounwind {
-; CHECKIZFBFMIN-LABEL: fcvt_d_bf16:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fcvt.s.bf16 fa5, fa0
-; CHECKIZFBFMIN-NEXT: fcvt.d.s fa0, fa5
-; CHECKIZFBFMIN-NEXT: ret
- %1 = fpext bfloat %a to double
- ret double %1
-}
-
-define bfloat @bfloat_load(ptr %a) nounwind {
-; CHECKIZFBFMIN-LABEL: bfloat_load:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: flh fa0, 6(a0)
-; CHECKIZFBFMIN-NEXT: ret
- %1 = getelementptr bfloat, ptr %a, i32 3
- %2 = load bfloat, ptr %1
- ret bfloat %2
-}
-
-define bfloat @bfloat_imm() nounwind {
-; CHECKIZFBFMIN-LABEL: bfloat_imm:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: lui a0, %hi(.LCPI7_0)
-; CHECKIZFBFMIN-NEXT: flh fa0, %lo(.LCPI7_0)(a0)
-; CHECKIZFBFMIN-NEXT: ret
- ret bfloat 3.0
-}
-
-define dso_local void @bfloat_store(ptr %a, bfloat %b) nounwind {
-; CHECKIZFBFMIN-LABEL: bfloat_store:
-; CHECKIZFBFMIN: # %bb.0:
-; CHECKIZFBFMIN-NEXT: fsh fa0, 0(a0)
-; CHECKIZFBFMIN-NEXT: fsh fa0, 16(a0)
-; CHECKIZFBFMIN-NEXT: ret
- store bfloat %b, ptr %a
- %1 = getelementptr bfloat, ptr %a, i32 8
- store bfloat %b, ptr %1
- ret void
-}
More information about the llvm-commits
mailing list