[all-commits] [llvm/llvm-project] 1d0dc9: [MLIR][SPIRV] Add rewrite pattern to convert selec...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Wed Dec 23 06:48:33 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d0dc9be6d72915d2bb632c7a46645289405dcbf
      https://github.com/llvm/llvm-project/commit/1d0dc9be6d72915d2bb632c7a46645289405dcbf
  Author: ergawy <kareem.ergawy at gmail.com>
  Date:   2020-12-23 (Wed, 23 Dec 2020)

  Changed paths:
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.h
    M mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td
    A mlir/lib/Dialect/SPIRV/IR/SPIRVGLSLCanonicalization.cpp
    A mlir/test/Dialect/SPIRV/Transforms/glsl_canonicalize.mlir
    M mlir/test/lib/Dialect/SPIRV/CMakeLists.txt
    A mlir/test/lib/Dialect/SPIRV/TestGLSLCanonicalization.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [MLIR][SPIRV] Add rewrite pattern to convert select+cmp into GLSL clamp.

Adds rewrite patterns to convert select+cmp instructions into clamp
instructions whenever possible. Support is added to convert:

- FOrdLessThan, FOrdLessThanEqual to GLSLFClampOp.
- SLessThan, SLessThanEqual to GLSLSClampOp.
- ULessThan, ULessThanEqual to GLSLUClampOp.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D93618




More information about the All-commits mailing list