Lines Matching refs:constant
1 // RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -test-constant-fold | FileCheck %s
8 // CHECK: [[C:%.+]] = arith.constant 6.{{0*}}e+00 : f32
11 %0 = arith.constant 4.5 : f32
12 %1 = arith.constant 1.5 : f32
27 %0 = arith.constant 4.5 : f32
28 %1 = arith.constant 1.5 : f32
30 // CHECK-NEXT: [[C:%.+]] = arith.constant 6.{{0*}}e+00 : f32
41 %0 = arith.constant dense<4.5> : tensor<4xf32>
42 %1 = arith.constant dense<1.5> : tensor<4xf32>
44 // CHECK-NEXT: [[C:%.+]] = arith.constant dense<6.{{0*}}e+00> : tensor<4xf32>
55 %0 = arith.constant dense<[1.5, 2.5, 3.5, 4.5]> : tensor<4xf32>
56 %1 = arith.constant dense<[1.5, 2.5, 3.5, 4.5]> : tensor<4xf32>
58 …// CHECK-NEXT: [[C:%.+]] = arith.constant dense<[3.{{0*}}e+00, 5.{{0*}}e+00, 7.{{0*}}e+00, 9.{{0*}…
69 %0 = arith.constant dense<[1.5, 2.5, 3.5, 4.5]> : tensor<4xf32>
70 %1 = arith.constant dense<1.5> : tensor<4xf32>
72 …// CHECK-NEXT: [[C:%.+]] = arith.constant dense<[3.{{0*}}e+00, 4.{{0*}}e+00, 5.{{0*}}e+00, 6.{{0*}…
83 %0 = arith.constant 1 : i32
84 %1 = arith.constant 5 : i32
86 // CHECK-NEXT: [[C:%.+]] = arith.constant 6 : i32
99 %c1 = arith.constant 1 : i1
100 %cAllOnes_32 = arith.constant 4294967295 : i32
102 // CHECK: [[C31:%.*]] = arith.constant 31 : i32
103 %c31 = arith.constant 31 : i32
119 // CHECK: [[C31:%.*]] = arith.constant 31 : index
120 %c31 = arith.constant 31 : index
121 %c_AllOnes = arith.constant -1 : index
134 %cAllOnes_32 = arith.constant dense<4294967295> : tensor<2xi32>
136 // CHECK: [[C31:%.*]] = arith.constant dense<31> : tensor<2xi32>
137 %c31 = arith.constant dense<31> : tensor<2xi32>
139 // CHECK: [[CMIXED:%.*]] = arith.constant dense<[31, -1]> : tensor<2xi32>
140 %c_mixed = arith.constant dense<[31, 4294967295]> : tensor<2xi32>
159 %cAllOnes_32 = arith.constant dense<4294967295> : vector<2xi32>
161 // CHECK: [[C31:%.*]] = arith.constant dense<31> : vector<2xi32>
162 %c31 = arith.constant dense<31> : vector<2xi32>
164 // CHECK: [[CMIXED:%.*]] = arith.constant dense<[31, -1]> : vector<2xi32>
165 %c_mixed = arith.constant dense<[31, 4294967295]> : vector<2xi32>
183 %0 = arith.constant dense<1> : vector<8xi32>
184 %1 = arith.constant dense<5> : vector<8xi32>
186 // CHECK-NEXT: [[C:%.+]] = arith.constant dense<6> : vector<8xi32>
197 %0 = arith.constant 4.5 : f32
198 %1 = arith.constant 1.5 : f32
200 // CHECK-NEXT: [[C:%.+]] = arith.constant 3.{{0*}}e+00 : f32
211 %0 = arith.constant dense<4.5> : vector<4xf32>
212 %1 = arith.constant dense<1.5> : vector<4xf32>
214 // CHECK-NEXT: [[C:%.+]] = arith.constant dense<3.{{0*}}e+00> : vector<4xf32>
226 %0 = arith.constant 4 : i32
227 %1 = arith.constant 1 : i32
228 %2 = arith.constant 0 : i32
230 // CHECK-NEXT:[[C3:%.+]] = arith.constant 3 : i32
242 %0 = arith.constant dense<4> : tensor<4xi32>
243 %1 = arith.constant dense<1> : tensor<4xi32>
245 // CHECK-NEXT: [[C:%.+]] = arith.constant dense<3> : tensor<4xi32>
256 %c177 = arith.constant 177 : index
257 %c211 = arith.constant 211 : index
258 %N = arith.constant 1075 : index
260 // CHECK:[[C1159:%.+]] = arith.constant 1159 : index
261 // CHECK:[[C1152:%.+]] = arith.constant 1152 : index
267 // CHECK:[[C42:%.+]] = arith.constant 42 : index
278 %0 = arith.constant 4.5 : f32
279 %1 = arith.constant 1.5 : f32
281 // CHECK-NEXT: [[C:%.+]] = arith.constant 6.75{{0*}}e+00 : f32
292 %0 = arith.constant dense<4.5> : tensor<4xf32>
293 %1 = arith.constant dense<1.5> : tensor<4xf32>
295 // CHECK-NEXT: [[C:%.+]] = arith.constant dense<6.75{{0*}}e+00> : tensor<4xf32>
306 // CHECK-DAG: [[C0:%.+]] = arith.constant 0
307 %z = arith.constant 0 : i32
308 // CHECK-DAG: [[C6:%.+]] = arith.constant 6
309 %0 = arith.constant 6 : i32
310 %1 = arith.constant 2 : i32
312 // CHECK-NEXT: [[C3:%.+]] = arith.constant 3 : i32
315 %3 = arith.constant -2 : i32
317 // CHECK-NEXT: [[CM3:%.+]] = arith.constant -3 : i32
331 // CHECK-DAG: [[C0:%.+]] = arith.constant dense<0>
332 %z = arith.constant dense<0> : tensor<4xi32>
333 // CHECK-DAG: [[C6:%.+]] = arith.constant dense<6>
334 %0 = arith.constant dense<6> : tensor<4xi32>
335 %1 = arith.constant dense<2> : tensor<4xi32>
337 // CHECK-NEXT: [[C3:%.+]] = arith.constant dense<3> : tensor<4xi32>
340 %3 = arith.constant dense<-2> : tensor<4xi32>
342 // CHECK-NEXT: [[CM3:%.+]] = arith.constant dense<-3> : tensor<4xi32>
356 %z = arith.constant 0 : i32
357 // CHECK-DAG: [[C6:%.+]] = arith.constant 6
358 %0 = arith.constant 6 : i32
359 %1 = arith.constant 2 : i32
361 // CHECK-DAG: [[C3:%.+]] = arith.constant 3 : i32
364 %3 = arith.constant -2 : i32
367 // CHECK-DAG: [[C0:%.+]] = arith.constant 0 : i32
382 %z = arith.constant dense<0> : tensor<4xi32>
383 // CHECK-DAG: [[C6:%.+]] = arith.constant dense<6>
384 %0 = arith.constant dense<6> : tensor<4xi32>
385 %1 = arith.constant dense<2> : tensor<4xi32>
387 // CHECK-DAG: [[C3:%.+]] = arith.constant dense<3> : tensor<4xi32>
390 %3 = arith.constant dense<-2> : tensor<4xi32>
393 // CHECK-DAG: [[C0:%.+]] = arith.constant dense<0> : tensor<4xi32>
407 // CHECK-DAG: [[C0:%.+]] = arith.constant 0
408 %z = arith.constant 0 : i32
409 // CHECK-DAG: [[C6:%.+]] = arith.constant 7
410 %0 = arith.constant 7 : i32
411 %1 = arith.constant 2 : i32
414 // CHECK-NEXT: [[C3:%.+]] = arith.constant 3 : i32
417 %3 = arith.constant -2 : i32
420 // CHECK-NEXT: [[CM3:%.+]] = arith.constant -4 : i32
423 %5 = arith.constant -9 : i32
426 // CHECK-NEXT: [[CM4:%.+]] = arith.constant -5 : i32
429 %7 = arith.constant -13 : i32
432 // CHECK-NEXT: [[CM5:%.+]] = arith.constant 6 : i32
445 // CHECK-DAG: [[C0:%.+]] = arith.constant 0
446 %z = arith.constant 0 : i32
447 // CHECK-DAG: [[C6:%.+]] = arith.constant 7
448 %0 = arith.constant 7 : i32
449 %1 = arith.constant 2 : i32
452 // CHECK-NEXT: [[C3:%.+]] = arith.constant 4 : i32
455 %3 = arith.constant -2 : i32
458 // CHECK-NEXT: [[CM3:%.+]] = arith.constant -3 : i32
461 %5 = arith.constant -9 : i32
464 // CHECK-NEXT: [[CM4:%.+]] = arith.constant -4 : i32
467 %7 = arith.constant -15 : i32
470 // CHECK-NEXT: [[CM5:%.+]] = arith.constant 8 : i32
483 // CHECK-DAG: [[C0:%.+]] = arith.constant 0
484 %z = arith.constant 0 : i32
485 // CHECK-DAG: [[C6:%.+]] = arith.constant 7
486 %0 = arith.constant 7 : i32
487 %1 = arith.constant 2 : i32
490 // CHECK-NEXT: [[C3:%.+]] = arith.constant 4 : i32
493 %3 = arith.constant -2 : i32
496 // CHECK-NEXT: [[CM1:%.+]] = arith.constant 1 : i32
499 %5 = arith.constant -8 : i32
502 // CHECK-NEXT: [[CM4:%.+]] = arith.constant 2147483644 : i32
505 %7 = arith.constant -15 : i32
508 // CHECK-NOT: arith.constant 1 : i32
521 %0 = arith.constant 5 : i32
522 %1 = arith.constant 2 : i32
523 %2 = arith.constant 1 : i32
524 %3 = arith.constant -2 : i32
526 // CHECK-NEXT:[[C1:%.+]] = arith.constant 1 : i32
529 // CHECK-NEXT:[[C0:%.+]] = arith.constant 0 : i32
540 %0 = arith.constant 5 : i32
541 %1 = arith.constant 2 : i32
542 %2 = arith.constant 1 : i32
543 %3 = arith.constant -2 : i32
545 // CHECK-DAG:[[C1:%.+]] = arith.constant 1 : i32
547 // CHECK-DAG:[[C5:%.+]] = arith.constant 5 : i32
549 // CHECK-DAG:[[C0:%.+]] = arith.constant 0 : i32
560 %0 = arith.constant 4 : i32
561 %1 = arith.constant 2 : i32
563 // CHECK-NEXT:[[C8:%.+]] = arith.constant 8 : i32
574 %0 = arith.constant dense<4> : vector<4xi32>
575 %1 = arith.constant dense<2> : vector<4xi32>
577 // CHECK-NEXT: [[C:%.+]] = arith.constant dense<8> : vector<4xi32>
587 // CHECK:[[C4:%.+]] = arith.constant 4 : index
588 %c1 = arith.constant 1 : index
599 %c42 = arith.constant 42 : i32
600 %cm1 = arith.constant -1 : i32
601 // CHECK-DAG: [[F:%.+]] = arith.constant false
602 // CHECK-DAG: [[T:%.+]] = arith.constant true
630 %c42 = arith.constant 42. : f32
631 %cm1 = arith.constant -1. : f32
632 // CHECK-DAG: [[F:%.+]] = arith.constant false
633 // CHECK-DAG: [[T:%.+]] = arith.constant true
673 %c42 = arith.constant 42. : f32
674 %cqnan = arith.constant 0xFFFFFFFF : f32
675 // CHECK-DAG: [[F:%.+]] = arith.constant false
676 // CHECK-DAG: [[T:%.+]] = arith.constant true
716 %c42 = arith.constant 42. : f32
717 %cpinf = arith.constant 0x7F800000 : f32
718 // CHECK-DAG: [[F:%.+]] = arith.constant false
719 // CHECK-DAG: [[T:%.+]] = arith.constant true
760 // CHECK-NEXT: arith.constant 2
762 %0 = arith.constant 1 : i32
768 // CHECK-NEXT: arith.constant 2
770 %0 = arith.constant 1 : i32
782 // CHECK-NEXT: arith.constant 2
785 %0 = arith.constant 1 : i32