[all-commits] [llvm/llvm-project] 40e2bb: [mlir][spirv] Add folding for Bitwise[Or|And|Xor] ...

Finn Plummer via All-commits all-commits at lists.llvm.org
Mon Dec 11 10:09:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 40e2bb5330840b56d452244f96e491b6530ce4bf
      https://github.com/llvm/llvm-project/commit/40e2bb5330840b56d452244f96e491b6530ce4bf
  Author: Finn Plummer <50529406+inbelic at users.noreply.github.com>
  Date:   2023-12-11 (Mon, 11 Dec 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBitOps.td
    M mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
    M mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/IR/bit-ops.mlir
    M mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir

  Log Message:
  -----------
  [mlir][spirv] Add folding for Bitwise[Or|And|Xor] (#74193)

Add missing constant propogation folder for Bitwise[Or|And|Xor].

Move previous Bitwise[Or|And] fold implementations to
SPIRVCanonicalization for consistency.

Implement additional folding when lhs == rhs and rhs = 0 for Xor. As
well as, update an Xor testcase to account for this introduced folding.

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

Part of work for #70704




More information about the All-commits mailing list