<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58048>58048</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`Dialect/Math/canonicalize.mlir` fails on trunk (`1e818cd8e262b402bd6d3cb380f83ca06966bb4b`)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ZolotukhinM
</td>
</tr>
</table>
<pre>
I was trying to follow instructions on how to build LLVM-MLIR from https://mlir.llvm.org/getting_started/:
```
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON
cmake --build . --target check-mlir
```
The build succeeded, but one test was failing:
```
FAIL: MLIR :: Dialect/Math/canonicalize.mlir (392 of 1458)
******************** TEST 'MLIR :: Dialect/Math/canonicalize.mlir' FAILED ********************
Script:
--
: 'RUN: at line 1'; /Users/mvz/dev/llvm-project/build/bin/mlir-opt /Users/mvz/dev/llvm-project/mlir/test/Dialect/Math/canonicalize.mlir -canonicalize | /Users/mvz/dev/llvm-project/build/bin/FileCheck /Users/mvz/dev/llvm-project/mlir/test/Dialect/Math/canonicalize.mlir
--
Exit Code: 1
Command Output (stderr):
--
/Users/mvz/dev/llvm-project/mlir/test/Dialect/Math/canonicalize.mlir:452:16: error: CHECK-NEXT: expected string not found in input
// CHECK-NEXT: %[[cst:.+]] = arith.constant 0.84{{[0-9]+}} : f32
^
<stdin>:200:21: note: scanning from here
func.func @sin_fold() -> f32 {
^
<stdin>:201:2: note: possible intended match here
%cst = arith.constant 8.414710e-01 : f32
^
/Users/mvz/dev/llvm-project/mlir/test/Dialect/Math/canonicalize.mlir:461:16: error: CHECK-NEXT: expected string not found in input
// CHECK-NEXT: %[[cst:.+]] = arith.constant dense<[0.000000e+00, 0.84{{[0-9]+}}, 0.000000e+00, 0.84{{[0-9]+}}]> : vector<4xf32>
^
<stdin>:204:25: note: scanning from here
func.func @sin_fold_vec() -> vector<4xf32> {
^
<stdin>:205:2: note: possible intended match here
%cst = arith.constant dense<[0.000000e+00, 8.414710e-01, 0.000000e+00, 8.414710e-01]> : vector<4xf32>
^
Input file: <stdin>
Check file: /Users/mvz/dev/llvm-project/mlir/test/Dialect/Math/canonicalize.mlir
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
195: }
196: func.func @trunc_fold_vec() -> vector<4xf32> {
197: %cst = arith.constant dense<[0.000000e+00, -0.000000e+00, 1.000000e+00, -1.000000e+00]> : vector<4xf32>
198: return %cst : vector<4xf32>
199: }
200: func.func @sin_fold() -> f32 {
next:452'0 X~~~~~~~~~~~ error: no match found
201: %cst = arith.constant 8.414710e-01 : f32
next:452'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:452'1 ? possible intended match
202: return %cst : f32
next:452'0 ~~~~~~~~~~~~~~~~~~~
203: }
next:452'0 ~~~
204: func.func @sin_fold_vec() -> vector<4xf32> {
next:452'0 ~~~~~~~~~~~~~~~~~~~~~~~~
next:461'0 X~~~~~~~~~~~~~~~~~~~~~ error: no match found
205: %cst = arith.constant dense<[0.000000e+00, 8.414710e-01, 0.000000e+00, 8.414710e-01]> : vector<4xf32>
next:461'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:461'1 ? possible intended match
206: return %cst : vector<4xf32>
next:461'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
207: }
next:461'0 ~~~
208: func.func @erf_fold() -> f32 {
next:461'0 ~~~~~~~~~~~~~~~~~~~~
209: %cst = arith.constant 0.842700779 : f32
210: return %cst : f32
.
.
.
>>>>>>
--
********************
********************
Failed Tests (1):
MLIR :: Dialect/Math/canonicalize.mlir
```
It was AArch64 build on M1 MacBook.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzVWNtyozgQ_Rr8ooJC3Hnwg43xbHbsJJV4tmb3xSWDCEyw5AKRyczXbwuY2A62YzvxXigVF6klne4-3RJa8PhH_wp9JyUSxY-MPSDBUcLznH9HGStFUUUi46xEnKEU6qB1UWV5jCaTP6bqdHJ1h5KCL1EqxKpUzIFijKEs86zQ8vxpqfHiAb4fqBAw9rwUpBA0lkIgqo8U_dfd0dtSf0ZL8kiR-gldZ-wbQZoGPeRwSLGDRgIhpI4khnl4PRhOwvnt3c3vYTC7V8yRnH2X5PDL1WQ0D78OpreTUAreXO8Smw3uPoWz-_nspukBgophpLwU8HjVIZgOPoftwLM_b0OQvaM5JSU9AHVwfx_eza5urhsMWyqrjXU1eANbgd1QlNLoUZU67TTVLKWtR8oqiiiNpXkDqBLgMooELUXt3YRkObhgbfftYcaDqwm0odqjUgjeRxnJaQRaj6dEpPCICOMsi0ie_aRaY2XDM30D8QRhy_YUw28HN84vaBbez2Bg9zQo0AFJJcIRes_sDf77qMhW4sVWqtqqBUhgnrsv1_KNCAQWpQhDlWIOwc2A60tJi1JGwNNPuMf0qWWuuir4t0aD2lvymbE2VFS-Ekd2blQdS7fC4wgPqZtVSHGDs1COs5wGkogXgrlt5_A5EyjgMZVmxpt5IuDLJWExuqnEqpI280oR06KQzOt46zJIzYFlG3DHjkQHc3NZh4LfwuCzeh1-ndXVzysYhkJQikImVcYFZNUKkGcMCmB_wQjlVWfFsBV7CCUqJQch-cHHCApEwwiRIhOpFkFOFoQJpGuepbhDWeyhrvpSEuTdERQZPSgxjZc8tHkpdviL1QEYEdxsQvoaGLou71h2BdS1C0qwApNqNKmeFrQdMalYpMkbUiy9zNgcVg4gjUwESIXx5ORIQtsF4DAKCcDYBLHiZZktcgrmE5RBmkNLIqJ0Ew4YDky2y0qeZmHLxTpV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