[all-commits] [llvm/llvm-project] c17aa1: [mlir][index] Fold `cmp(x, x)` when `x` isn't a co...

Xiangxi Guo (Ryan) via All-commits all-commits at lists.llvm.org
Fri Jan 19 15:54:45 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c17aa14f4ca101db247d124b4b05506247aa330f
      https://github.com/llvm/llvm-project/commit/c17aa14f4ca101db247d124b4b05506247aa330f
  Author: Xiangxi Guo (Ryan) <ryanguo at modular.com>
  Date:   2024-01-19 (Fri, 19 Jan 2024)

  Changed paths:
    M mlir/lib/Dialect/Index/IR/IndexOps.cpp
    M mlir/test/Dialect/Index/index-canonicalize.mlir

  Log Message:
  -----------
  [mlir][index] Fold `cmp(x, x)` when `x` isn't a constant (#78812)

Such cases show up in the middle of optimizations passes, e.g., after
some rewrites and then CSE. The current folder can fold such cases when
the inputs are constant; this patch improves it to fold even if the
inputs are non-constant.




More information about the All-commits mailing list