[Mlir-commits] [mlir] [mlir][Vector] Generate poison vectors in vector.shape_cast lowering (PR #125613)

Andrzej Warzyński llvmlistbot at llvm.org
Wed Feb 5 08:15:54 PST 2025


================
@@ -7,7 +7,7 @@
 // CHECK-SAME: %[[arg0:.*]]: vector<2x1x[4]xi32>
 func.func @i32_3d_to_1d_last_dim_scalable(%arg0: vector<2x1x[4]xi32>) -> vector<[8]xi32>
 {
-  // CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0> : vector<[8]xi32>
+  // CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<[8]xi32>
----------------
banach-space wrote:

[nit] Here and other places - since this is no longer an  `arith.constant`, perhaps let's rename the LIT variables? `cst` is just going to be confusing (and most likely copied by people).

`cst` -> `poison`? `cst` -> `init` ? `cst` -> `ubp`? `cst` -> `undef`.

Naming is hard 🤷🏻‍♂️ Avoiding `cst` should be a "win" regardless of the alternative.

https://github.com/llvm/llvm-project/pull/125613


More information about the Mlir-commits mailing list