[all-commits] [llvm/llvm-project] b378c7: [profcheck] Fix profile metadata propagation for L...

Jin Huang via All-commits all-commits at lists.llvm.org
Thu May 28 21:09:55 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b378c7162613afdc982e8a2e6ec478066ea04492
      https://github.com/llvm/llvm-project/commit/b378c7162613afdc982e8a2e6ec478066ea04492
  Author: Jin Huang <jinhuang1102 at gmail.com>
  Date:   2026-05-28 (Thu, 28 May 2026)

  Changed paths:
    M llvm/lib/CodeGen/ExpandIRInsts.cpp
    M llvm/test/CodeGen/AArch64/fcvt-i256.ll
    M llvm/test/CodeGen/AMDGPU/itofp.i128.bf.ll
    M llvm/test/CodeGen/AMDGPU/itofp.i128.ll
    M llvm/test/CodeGen/RISCV/bitint-fp-conv-200.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-fp-convert-small.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-int-convert-small.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-large-fp-convert-fptosi129.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-large-fp-convert-fptoui129.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-large-fp-convert-si129tofp.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-large-fp-convert-ui129tofp.ll
    M llvm/test/Transforms/ExpandIRInsts/X86/expand-large-fp-optnone.ll

  Log Message:
  -----------
  [profcheck] Fix profile metadata propagation for Large FP Operations (#175864)

This PR improves the propagation of profile metadata within the
ExpandIRInsts pass. When lowering non-standard floating-point
operations, the pass now ensures that branch weights are correctly
attached to the generated control flow, preventing the loss of profile
data during IR expansion.

This enhancements cover the conversions between non-standard
floating-point formats and large integers (e.g., `fptosi/fptoui`,
`sitofp/uitofp` involving `i129`).

This PR implements Heuristic-Based Branch Weights labeling using
established heuristics for Floating-point rounding overflow and
saturation checks and adds detailed comments within the expansion logic
to explain the rationale behind specific branch weight choices and the
underlying mathematical invariants.

Please refer to the implementation details in the source code for the
specific branch weight values and the logic governing their application.

---------

Co-authored-by: Jin Huang <jingold at google.com>
Co-authored-by: Aiden Grossman <aidengrossman at google.com>



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