[Mlir-commits] [mlir] [mlir][arith] Add result pretty printing for constant vscale values (PR #83565)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Mar 19 10:48:02 PDT 2024
================
@@ -0,0 +1,14 @@
+// RUN: mlir-opt %s | FileCheck %s
+
+// Note: This test is checking value names (so deliberately is not using a regex match).
+
+func.func @test_vscale_constant_names() {
+ %0 = vector.vscale
+ %1 = arith.constant 8 : index
+ %2 = arith.constant 10 : index
+ // CHECK: %c8_vscale = arith.muli %c8, %vscale : index
+ %3 = arith.muli %1, %0 : index
+ // CHECK: %c10_vscale = arith.muli %vscale, %c10 : index
+ %4 = arith.muli %0, %2 : index
+ return
----------------
banach-space wrote:
[nit] Move %2 closer to where it's used
```suggestion
// CHECK: %c8_vscale = arith.muli %c8, %vscale : index
%3 = arith.muli %1, %0 : index
// CHECK: %c10_vscale = arith.muli %vscale, %c10 : index
%2 = arith.constant 10 : index
%4 = arith.muli %0, %2 : index
return
```
https://github.com/llvm/llvm-project/pull/83565
More information about the Mlir-commits
mailing list