[all-commits] [llvm/llvm-project] b66b10: [IR] Add fast-math support to {u, s}itofp (#198470)

paperchalice via All-commits all-commits at lists.llvm.org
Thu Jun 4 01:45:23 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b66b10e852ea3bcb4a35ff83c781bf875ed50870
      https://github.com/llvm/llvm-project/commit/b66b10e852ea3bcb4a35ff83c781bf875ed50870
  Author: paperchalice <liujunchang97 at outlook.com>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M clang/test/CodeGenCUDA/amdgpu-atomic-ops.cu
    M clang/test/CodeGenCUDA/managed-var.cu
    M clang/test/CodeGenHIP/builtins-amdgcn-vi-f16.hip
    M clang/test/CodeGenHLSL/BasicFeatures/AggregateSplatCast.hlsl
    M clang/test/CodeGenHLSL/BasicFeatures/ArrayElementwiseCast.hlsl
    M clang/test/CodeGenHLSL/BasicFeatures/InitLists.hlsl
    M clang/test/CodeGenHLSL/BasicFeatures/MatrixSplat.hlsl
    M clang/test/CodeGenHLSL/BasicFeatures/OutputArguments.hlsl
    M clang/test/CodeGenHLSL/BasicFeatures/StructElementwiseCast.hlsl
    M clang/test/CodeGenHLSL/Operators/logical-not.hlsl
    M clang/test/CodeGenHLSL/builtins/acos-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/asin-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/atan-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/atan2-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/atan2-overloads_mat.hlsl
    M clang/test/CodeGenHLSL/builtins/ceil-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/cos-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/degrees-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/dot2add.hlsl
    M clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/floor-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/frac-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/lerp-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/log-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/log10-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/log2-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/pow-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/radians-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/round-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/rsqrt-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/sinh-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/sqrt-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/step-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/tan-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/tanh-overloads.hlsl
    M clang/test/CodeGenHLSL/builtins/trunc-overloads.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-GetDimensions.hlsl
    M clang/test/Headers/__clang_hip_math.hip
    M clang/test/Headers/openmp_device_math_isnan.cpp
    M clang/test/SemaHLSL/VectorOverloadResolution.hlsl
    M llvm/docs/LangRef.rst
    M llvm/docs/ReleaseNotes.md
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/include/llvm/IR/Instructions.h
    M llvm/include/llvm/IR/Operator.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/IR/Operator.cpp
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/test/Assembler/fast-math-flags.ll
    M llvm/test/Bitcode/compatibility.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fold-binop-select.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pown.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-rootn.ll
    M llvm/test/CodeGen/AMDGPU/divrem24-assume.ll
    M llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
    M llvm/test/Transforms/InstCombine/log-pow.ll

  Log Message:
  -----------
  [IR] Add fast-math support to {u,s}itofp (#198470)

- `{u,s}itofp` are floating point typed values.
- CodeGen part (foldFPToIntToFP in DAGCombiner) needs `nsz` to fold
pattern (uitofp (fptoui x)) -> (trunc x).
- LLVM has intrinsic variants of `{u,s}itofp`, which already support
fast-math flags.

Now optimization flags require 9 bits in bitcode, fast-math flags of
`uitofp` are stored in high 8 bits.
VPlan part may need some extra work, it assumes optimization flags from
different categories are disjoint.



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