[llvm] 3d6b37e - [RuntimeLibcalls] Fix spelling fminmum->fminimum fmaxmum->fmaximum. (#118728)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 20:28:57 PST 2024
Author: Craig Topper
Date: 2024-12-06T20:28:53-08:00
New Revision: 3d6b37e3c3e135f5f25f4f4f1cdb1ffbc6d13c89
URL: https://github.com/llvm/llvm-project/commit/3d6b37e3c3e135f5f25f4f4f1cdb1ffbc6d13c89
DIFF: https://github.com/llvm/llvm-project/commit/3d6b37e3c3e135f5f25f4f4f1cdb1ffbc6d13c89.diff
LOG: [RuntimeLibcalls] Fix spelling fminmum->fminimum fmaxmum->fmaximum. (#118728)
Added:
Modified:
llvm/include/llvm/IR/RuntimeLibcalls.def
llvm/test/CodeGen/RISCV/fp128.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.def b/llvm/include/llvm/IR/RuntimeLibcalls.def
index 13a27b58b9cd78..8153845b52c7ae 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.def
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.def
@@ -307,22 +307,22 @@ HANDLE_LIBCALL(FMAX_PPCF128, "fmaxl")
HANDLE_LIBCALL(FMINIMUM_F32, "fminimumf")
HANDLE_LIBCALL(FMINIMUM_F64, "fminimum")
HANDLE_LIBCALL(FMINIMUM_F80, "fminimuml")
-HANDLE_LIBCALL(FMINIMUM_F128, "fminmuml")
+HANDLE_LIBCALL(FMINIMUM_F128, "fminimuml")
HANDLE_LIBCALL(FMINIMUM_PPCF128, "fminimuml")
HANDLE_LIBCALL(FMAXIMUM_F32, "fmaximumf")
HANDLE_LIBCALL(FMAXIMUM_F64, "fmaximum")
HANDLE_LIBCALL(FMAXIMUM_F80, "fmaximuml")
-HANDLE_LIBCALL(FMAXIMUM_F128, "fmaxmuml")
+HANDLE_LIBCALL(FMAXIMUM_F128, "fmaximuml")
HANDLE_LIBCALL(FMAXIMUM_PPCF128, "fmaximum_numl")
HANDLE_LIBCALL(FMINIMUMNUM_F32, "fminimum_numf")
HANDLE_LIBCALL(FMINIMUMNUM_F64, "fminimum_num")
HANDLE_LIBCALL(FMINIMUMNUM_F80, "fminimum_numl")
-HANDLE_LIBCALL(FMINIMUMNUM_F128, "fminmum_numl")
+HANDLE_LIBCALL(FMINIMUMNUM_F128, "fminimum_numl")
HANDLE_LIBCALL(FMINIMUMNUM_PPCF128, "fminimum_numl")
HANDLE_LIBCALL(FMAXIMUMNUM_F32, "fmaximum_numf")
HANDLE_LIBCALL(FMAXIMUMNUM_F64, "fmaximum_num")
HANDLE_LIBCALL(FMAXIMUMNUM_F80, "fmaximum_numl")
-HANDLE_LIBCALL(FMAXIMUMNUM_F128, "fmaxmum_numl")
+HANDLE_LIBCALL(FMAXIMUMNUM_F128, "fmaximum_numl")
HANDLE_LIBCALL(FMAXIMUMNUM_PPCF128, "fmaximum_numl")
HANDLE_LIBCALL(LROUND_F32, "lroundf")
HANDLE_LIBCALL(LROUND_F64, "lround")
diff --git a/llvm/test/CodeGen/RISCV/fp128.ll b/llvm/test/CodeGen/RISCV/fp128.ll
index 581ee5cd2304df..a8e26f7686e50d 100644
--- a/llvm/test/CodeGen/RISCV/fp128.ll
+++ b/llvm/test/CodeGen/RISCV/fp128.ll
@@ -91,3 +91,101 @@ define i32 @test_add_and_fptosi() nounwind {
%4 = fptosi fp128 %3 to i32
ret i32 %4
}
+
+define fp128 @fmaximum(fp128 %x, fp128 %y) {
+; RV32I-LABEL: fmaximum:
+; RV32I: # %bb.0:
+; RV32I-NEXT: addi sp, sp, -64
+; RV32I-NEXT: .cfi_def_cfa_offset 64
+; RV32I-NEXT: sw ra, 60(sp) # 4-byte Folded Spill
+; RV32I-NEXT: sw s0, 56(sp) # 4-byte Folded Spill
+; RV32I-NEXT: .cfi_offset ra, -4
+; RV32I-NEXT: .cfi_offset s0, -8
+; RV32I-NEXT: lw a3, 0(a1)
+; RV32I-NEXT: lw a4, 4(a1)
+; RV32I-NEXT: lw a5, 8(a1)
+; RV32I-NEXT: lw a6, 12(a1)
+; RV32I-NEXT: lw a1, 0(a2)
+; RV32I-NEXT: lw a7, 4(a2)
+; RV32I-NEXT: lw t0, 8(a2)
+; RV32I-NEXT: lw a2, 12(a2)
+; RV32I-NEXT: mv s0, a0
+; RV32I-NEXT: sw a1, 8(sp)
+; RV32I-NEXT: sw a7, 12(sp)
+; RV32I-NEXT: sw t0, 16(sp)
+; RV32I-NEXT: sw a2, 20(sp)
+; RV32I-NEXT: addi a0, sp, 40
+; RV32I-NEXT: addi a1, sp, 24
+; RV32I-NEXT: addi a2, sp, 8
+; RV32I-NEXT: sw a3, 24(sp)
+; RV32I-NEXT: sw a4, 28(sp)
+; RV32I-NEXT: sw a5, 32(sp)
+; RV32I-NEXT: sw a6, 36(sp)
+; RV32I-NEXT: call fmaximuml
+; RV32I-NEXT: lw a0, 40(sp)
+; RV32I-NEXT: lw a1, 44(sp)
+; RV32I-NEXT: lw a2, 48(sp)
+; RV32I-NEXT: lw a3, 52(sp)
+; RV32I-NEXT: sw a0, 0(s0)
+; RV32I-NEXT: sw a1, 4(s0)
+; RV32I-NEXT: sw a2, 8(s0)
+; RV32I-NEXT: sw a3, 12(s0)
+; RV32I-NEXT: lw ra, 60(sp) # 4-byte Folded Reload
+; RV32I-NEXT: lw s0, 56(sp) # 4-byte Folded Reload
+; RV32I-NEXT: .cfi_restore ra
+; RV32I-NEXT: .cfi_restore s0
+; RV32I-NEXT: addi sp, sp, 64
+; RV32I-NEXT: .cfi_def_cfa_offset 0
+; RV32I-NEXT: ret
+ %a = call fp128 @llvm.maximum.fp128(fp128 %x, fp128 %y)
+ ret fp128 %a
+}
+
+define fp128 @fminimum(fp128 %x, fp128 %y) {
+; RV32I-LABEL: fminimum:
+; RV32I: # %bb.0:
+; RV32I-NEXT: addi sp, sp, -64
+; RV32I-NEXT: .cfi_def_cfa_offset 64
+; RV32I-NEXT: sw ra, 60(sp) # 4-byte Folded Spill
+; RV32I-NEXT: sw s0, 56(sp) # 4-byte Folded Spill
+; RV32I-NEXT: .cfi_offset ra, -4
+; RV32I-NEXT: .cfi_offset s0, -8
+; RV32I-NEXT: lw a3, 0(a1)
+; RV32I-NEXT: lw a4, 4(a1)
+; RV32I-NEXT: lw a5, 8(a1)
+; RV32I-NEXT: lw a6, 12(a1)
+; RV32I-NEXT: lw a1, 0(a2)
+; RV32I-NEXT: lw a7, 4(a2)
+; RV32I-NEXT: lw t0, 8(a2)
+; RV32I-NEXT: lw a2, 12(a2)
+; RV32I-NEXT: mv s0, a0
+; RV32I-NEXT: sw a1, 8(sp)
+; RV32I-NEXT: sw a7, 12(sp)
+; RV32I-NEXT: sw t0, 16(sp)
+; RV32I-NEXT: sw a2, 20(sp)
+; RV32I-NEXT: addi a0, sp, 40
+; RV32I-NEXT: addi a1, sp, 24
+; RV32I-NEXT: addi a2, sp, 8
+; RV32I-NEXT: sw a3, 24(sp)
+; RV32I-NEXT: sw a4, 28(sp)
+; RV32I-NEXT: sw a5, 32(sp)
+; RV32I-NEXT: sw a6, 36(sp)
+; RV32I-NEXT: call fminimuml
+; RV32I-NEXT: lw a0, 40(sp)
+; RV32I-NEXT: lw a1, 44(sp)
+; RV32I-NEXT: lw a2, 48(sp)
+; RV32I-NEXT: lw a3, 52(sp)
+; RV32I-NEXT: sw a0, 0(s0)
+; RV32I-NEXT: sw a1, 4(s0)
+; RV32I-NEXT: sw a2, 8(s0)
+; RV32I-NEXT: sw a3, 12(s0)
+; RV32I-NEXT: lw ra, 60(sp) # 4-byte Folded Reload
+; RV32I-NEXT: lw s0, 56(sp) # 4-byte Folded Reload
+; RV32I-NEXT: .cfi_restore ra
+; RV32I-NEXT: .cfi_restore s0
+; RV32I-NEXT: addi sp, sp, 64
+; RV32I-NEXT: .cfi_def_cfa_offset 0
+; RV32I-NEXT: ret
+ %a = call fp128 @llvm.minimum.fp128(fp128 %x, fp128 %y)
+ ret fp128 %a
+}
More information about the llvm-commits
mailing list