[all-commits] [llvm/llvm-project] 8679d1: [SDAG] Honor signed arguments in floating point li...

Timothy Pearson via All-commits all-commits at lists.llvm.org
Mon Sep 30 23:55:34 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8679d1b51bd91d638ac3babba03a404e4031f9ea
      https://github.com/llvm/llvm-project/commit/8679d1b51bd91d638ac3babba03a404e4031f9ea
  Author: Timothy Pearson <162513562+tpearson-ssc at users.noreply.github.com>
  Date:   2024-10-01 (Tue, 01 Oct 2024)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    M llvm/test/CodeGen/PowerPC/ldexp-libcall.ll
    M llvm/test/CodeGen/PowerPC/ldexp.ll
    A llvm/test/CodeGen/PowerPC/negative-integer-fp-libcall.ll
    M llvm/test/CodeGen/X86/fold-int-pow2-with-fmul-or-fdiv.ll

  Log Message:
  -----------
  [SDAG] Honor signed arguments in floating point libcalls (#109134)

In ExpandFPLibCall, an assumption is made that all floating point
libcalls that take integer arguments use unsigned integers. In the case
of ldexp and frexp, this assumption is incorrect, leading to
miscompilation and subsequent target-dependent incorrect operation.

Indicate that ldexp and frexp utilize signed arguments in
ExpandFPLibCall.

Fixes #108904

Signed-off-by: Timothy Pearson <tpearson at solidsilicon.com>
(cherry picked from commit 90c14748638f1e10e31173b145fdbb5c4529c922)



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