[Mlir-commits] [mlir] [MLIR][SCF] Verify number of operands in scf.parallel reduce terminator (PR #171450)
Mehdi Amini
llvmlistbot at llvm.org
Tue Dec 9 06:42:05 PST 2025
================
@@ -274,6 +274,20 @@ func.func @parallel_different_types_of_results_and_reduces(
// -----
+// The scf.parallel operation requires the number of operands in the terminator
+// (scf.reduce) to match the number of initial values provided to the loop.
+func.func @invalid_parallel_reduce_operand_count() {
+ %c0 = arith.constant 0 : index
+ %c1 = arith.constant 1 : index
+ // expected-error @+1 {{expects number of operands in the terminator: 1 to be the same as number of initial values: 0}}
+ scf.parallel (%arg1) = (%c0) to (%c1) step (%c1) {
+ scf.reduce(%c1 : index)
----------------
joker-eph wrote:
Do we already verify that the scf.reduce has the right number of regions?
https://github.com/llvm/llvm-project/pull/171450
More information about the Mlir-commits
mailing list