[all-commits] [llvm/llvm-project] f1822c: [mlir][xevm] Fix greedy rewriter crash in HandleVe...

Hocky Yudhiono via All-commits all-commits at lists.llvm.org
Tue Apr 28 21:22:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1822ca73578be7db7214bb098a8ad7bb7b65324
      https://github.com/llvm/llvm-project/commit/f1822ca73578be7db7214bb098a8ad7bb7b65324
  Author: Hocky Yudhiono <hocky.yudhiono at gmail.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp

  Log Message:
  -----------
  [mlir][xevm] Fix greedy rewriter crash in HandleVectorExtractPattern matches shuffles on block arguments (#192213)

`HandleVectorExtractPattern` could report `success()` without rewriting
the IR when `llvm.shufflevector` extracted a contiguous slice from a
**block argument** (no defining op). The greedy rewriter’s expensive
checks then aborted with *“pattern returned success but IR did not
change”*.

The pattern only performs work when the shuffle’s operand is defined by
another op (`FPExt`, `FPTrunc`, `bitcast`, nested `shufflevector`, or
`load`). For operands like function arguments, `getDefiningOp()` is
null, so nothing is rewritten; the function still fell through to
`return success()` without changing the IR and would crash when
`MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS` is on. `mlir-opt
--convert-xevm-to-llvm --split-input-file
mlir/test/Conversion/XeVMToLLVM/xevm_mx-to-llvm.mlir` no longer hits the
fatal error.

Assisted-by: Cursor (Composer 2)



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