[all-commits] [llvm/llvm-project] 7a931b: [GlobalISel] Use getCmpLibcallReturnType() for FCM...

Kiroo (Chanung) via All-commits all-commits at lists.llvm.org
Mon Sep 28 00:45:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a931b5ec3f305a51f702cb0702d2a07f7e74c0b
      https://github.com/llvm/llvm-project/commit/7a931b5ec3f305a51f702cb0702d2a07f7e74c0b
  Author: Kiroo (Chanung) <ung at zlfn.space>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp

  Log Message:
  -----------
  [GlobalISel] Use getCmpLibcallReturnType() for FCMP libcalls (NFC) (#226813)

The GCC soft-float comparison routines return `CMPtype`, not always
`i32`.


https://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html#Comparison-functions-1
> 3.2.3 Comparison functions
> There are two sets of basic comparison functions.
> ...
> Runtime Function: CMPtype __unordsf2 (float a, float b)
> Runtime Function: CMPtype __unorddf2 (double a, double b)
> Runtime Function: CMPtype __unordtf2 (long double a, long double b)
> ...

The FCMP libcall result was hardcoded to i32. Use
`getCmpLibcallReturnType()`, as SelectionDAG does.

NFC for in-tree targets.

Co-authored-by: Thorbjørn Ravn Andersen <tra at ravnand.dk>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list