[all-commits] [llvm/llvm-project] 8557b5: [DAG] Fold INT_TO_FP( FP_TO_INT (x) ) to FTRUNC(X)...

Jacob Crawley via All-commits all-commits at lists.llvm.org
Thu Jun 4 02:23:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8557b5714bca181906118a86d8152598f525fcc7
      https://github.com/llvm/llvm-project/commit/8557b5714bca181906118a86d8152598f525fcc7
  Author: Jacob Crawley <jacob.crawley at arm.com>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    A llvm/test/CodeGen/AArch64/sve-fixed-length-frintz.ll
    A llvm/test/CodeGen/AArch64/sve-frintz.ll
    M llvm/test/CodeGen/AMDGPU/fptoui_uitofp.ll

  Log Message:
  -----------
  [DAG] Fold INT_TO_FP( FP_TO_INT (x) ) to FTRUNC(X)  (#198477)

Extends the `foldFPToIntToFP` DAG Combine so that it can now be applied
when `FTRUNC` has a custom lowering, and given that `INT_TO_FP
(FP_TO_INT (X))` is not already legal.

On AArch64 targets with SVE, this change simplifies the codegen of
`INT_TO_FP (FP_TO_INT (X))` conversions by making use of the `frintz`
instruction.



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