Skip to content

Conversation

banach-space
Copy link
Contributor

Small follow-up for #158528,
otherwise it's not clear what makes the updated tests "negative".

Small follow-up for llvm#158528,
otherwise it's not clear what makes the updated tests "negative".
@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2025

@llvm/pr-subscribers-mlir-vector

Author: Andrzej Warzyński (banach-space)

Changes

Small follow-up for #158528,
otherwise it's not clear what makes the updated tests "negative".


Full diff: https://github.com/llvm/llvm-project/pull/160106.diff

1 Files Affected:

  • (modified) mlir/test/Dialect/Vector/canonicalize.mlir (+9)
diff --git a/mlir/test/Dialect/Vector/canonicalize.mlir b/mlir/test/Dialect/Vector/canonicalize.mlir
index 08d28be3f8f73..0b88f22765e72 100644
--- a/mlir/test/Dialect/Vector/canonicalize.mlir
+++ b/mlir/test/Dialect/Vector/canonicalize.mlir
@@ -3377,6 +3377,9 @@ func.func @negative_from_elements_to_constant() -> vector<1x!llvm.ptr> {
 
 // -----
 
+// `foldFromElementsToConstant` does not support `ub.poison`, so it bails out.
+// Instead, other folders apply here (e.g. `rewriteFromElementsAsBroadcast`).
+
 // CHECK-LABEL: @negative_from_elements_poison
 //       CHECK:   %[[VAL:.*]] = ub.poison : vector<2xf32>
 //       CHECK:   return %[[VAL]] : vector<2xf32>
@@ -3388,6 +3391,9 @@ func.func @negative_from_elements_poison_f32() -> vector<2xf32> {
 
 // -----
 
+// `foldFromElementsToConstant` does not support `ub.poison`, so it bails out.
+// Instead, other folders apply here (e.g. `rewriteFromElementsAsBroadcast`).
+
 // CHECK-LABEL: @negative_from_elements_poison_i32
 //       CHECK:   %[[VAL:.*]] = ub.poison : vector<2xi32>
 //       CHECK:   return %[[VAL]] : vector<2xi32>
@@ -3399,6 +3405,9 @@ func.func @negative_from_elements_poison_i32() -> vector<2xi32> {
 
 // -----
 
+// `foldFromElementsToConstant` does not support `ub.poison`, so it bails out.
+// Instead, other folders apply here (e.g. `rewriteFromElementsAsBroadcast`).
+
 // CHECK-LABEL: @negative_from_elements_poison_constant_mix
 //       CHECK:   %[[POISON:.*]] = ub.poison : f32
 //       CHECK:   %[[CONST:.*]] = arith.constant 1.000000e+00 : f32

@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2025

@llvm/pr-subscribers-mlir

Author: Andrzej Warzyński (banach-space)

Changes

Small follow-up for #158528,
otherwise it's not clear what makes the updated tests "negative".


Full diff: https://github.com/llvm/llvm-project/pull/160106.diff

1 Files Affected:

  • (modified) mlir/test/Dialect/Vector/canonicalize.mlir (+9)
diff --git a/mlir/test/Dialect/Vector/canonicalize.mlir b/mlir/test/Dialect/Vector/canonicalize.mlir
index 08d28be3f8f730..0b88f22765e723 100644
--- a/mlir/test/Dialect/Vector/canonicalize.mlir
+++ b/mlir/test/Dialect/Vector/canonicalize.mlir
@@ -3377,6 +3377,9 @@ func.func @negative_from_elements_to_constant() -> vector<1x!llvm.ptr> {
 
 // -----
 
+// `foldFromElementsToConstant` does not support `ub.poison`, so it bails out.
+// Instead, other folders apply here (e.g. `rewriteFromElementsAsBroadcast`).
+
 // CHECK-LABEL: @negative_from_elements_poison
 //       CHECK:   %[[VAL:.*]] = ub.poison : vector<2xf32>
 //       CHECK:   return %[[VAL]] : vector<2xf32>
@@ -3388,6 +3391,9 @@ func.func @negative_from_elements_poison_f32() -> vector<2xf32> {
 
 // -----
 
+// `foldFromElementsToConstant` does not support `ub.poison`, so it bails out.
+// Instead, other folders apply here (e.g. `rewriteFromElementsAsBroadcast`).
+
 // CHECK-LABEL: @negative_from_elements_poison_i32
 //       CHECK:   %[[VAL:.*]] = ub.poison : vector<2xi32>
 //       CHECK:   return %[[VAL]] : vector<2xi32>
@@ -3399,6 +3405,9 @@ func.func @negative_from_elements_poison_i32() -> vector<2xi32> {
 
 // -----
 
+// `foldFromElementsToConstant` does not support `ub.poison`, so it bails out.
+// Instead, other folders apply here (e.g. `rewriteFromElementsAsBroadcast`).
+
 // CHECK-LABEL: @negative_from_elements_poison_constant_mix
 //       CHECK:   %[[POISON:.*]] = ub.poison : f32
 //       CHECK:   %[[CONST:.*]] = arith.constant 1.000000e+00 : f32

@banach-space
Copy link
Contributor Author

CC @jhalakpatel

Copy link
Contributor

@dcaballe dcaballe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, Thanks!

Copy link
Contributor

@jhalakpatel jhalakpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks.

@banach-space banach-space merged commit e543ca6 into llvm:main Oct 5, 2025
13 checks passed
@banach-space banach-space deleted the andrzej/vector/add_comments branch October 5, 2025 16:35
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 6, 2025
Small follow-up for llvm#158528,
otherwise it's not clear what makes the updated tests "negative".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants