[all-commits] [llvm/llvm-project] 1bc588: [MLIR][SPIRV] Add spirv.IsFinite and lower math.{i...

Xiaolei Feng via All-commits all-commits at lists.llvm.org
Thu Jul 31 10:54:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1bc58851868ad1f8ac6313d9f2337ec827b85019
      https://github.com/llvm/llvm-project/commit/1bc58851868ad1f8ac6313d9f2337ec827b85019
  Author: Xiaolei Feng <76484843+Rayfxl at users.noreply.github.com>
  Date:   2025-07-31 (Thu, 31 Jul 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
    M mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
    A mlir/test/Conversion/MathToSPIRV/math-to-fpclassify-spirv.mlir
    M mlir/test/Dialect/SPIRV/IR/logical-ops.mlir
    M mlir/test/Target/SPIRV/logical-ops.mlir

  Log Message:
  -----------
  [MLIR][SPIRV] Add spirv.IsFinite and lower math.{isfinite,isinf,isnan} to spirv. (#151552)

This patch adds support for lowering several float classification ops
from the Math dialect to the SPIR-V dialect.

### Highlights:
- Introduced a new `spirv.IsFinite` operation corresponding to the
SPIR-V `OpIsFinite` instruction.
- Lowered `math.isfinite`, `math.isinf`, and `math.isnan` to SPIR-V
using `CheckedElementwiseOpPattern`.
- Added corresponding tests for op definition and conversion lowering.

This addresses the discussion in:
https://github.com/llvm/llvm-project/issues/150778

---

Let me know if any additional adjustments are needed!

---------

Co-authored-by: Jakub Kuderski <kubakuderski at gmail.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