[all-commits] [llvm/llvm-project] 8a42e2: [MLIR][Math] Move exponent threshold check before ...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Wed Apr 15 06:11:57 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8a42e2ffc5ffb756ad838db297ac23d4fa78a05f
https://github.com/llvm/llvm-project/commit/8a42e2ffc5ffb756ad838db297ac23d4fa78a05f
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-04-15 (Wed, 15 Apr 2026)
Changed paths:
M mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
Log Message:
-----------
[MLIR][Math] Move exponent threshold check before IR creation in PowIStrengthReduction (#188955)
PowIStrengthReduction::matchAndRewrite was creating the `one` constant
(using complex::ConstantOp::create for complex::PowiOp) before the
threshold check that guards whether the rewrite is profitable. When the
exponent exceeds the threshold, the pattern returned failure() after IR
was already modified, violating
MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS.
Fix: reorder so the abs(exponent) computation and threshold check occur
before any IR creation.
Assisted-by: Claude Code
Fix a failure present with MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS=ON.
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