[all-commits] [llvm/llvm-project] 5259e1: [mlir][spirv] Add folding for [S|U]Mod, [S|U]Div, ...

Finn Plummer via All-commits all-commits at lists.llvm.org
Wed Nov 29 10:40:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5259e14e7dcb58f50c31cf3b15a9b9f6e64dc7a1
      https://github.com/llvm/llvm-project/commit/5259e14e7dcb58f50c31cf3b15a9b9f6e64dc7a1
  Author: Finn Plummer <50529406+inbelic at users.noreply.github.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVArithmeticOps.td
    M mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
    M mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir

  Log Message:
  -----------
  [mlir][spirv] Add folding for [S|U]Mod, [S|U]Div, SRem (#73341)

Add missing constant propogation folder for [S|U]Mod, [S|U]Div, SRem

Implement additional folding when rhs is 1 for all ops.

This helps for readability of lowered code into SPIR-V.

Part of work for #70704




More information about the All-commits mailing list