EnzymeAD / EnzymeAD/Enzyme-JAX
More optimization patterns as required
- Dominant language
- MLIR
- Stars
- 131
- Forks
- 53
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 193
Description
```
%3 = llvm.mlir.constant(dense<[-8.900000e+01, 5.000000e-01]> : tensor<2xf64>) : !llvm.array<2 x f64>
%87 = llvm.extractvalue %2[0] : !llvm.array<2 x f64>
%50 = "llvm.intr.is.fpclass"(%cst_2) <{bit = 504 : i32}> : (f64) -> i1
%113:10 = scf.while (%arg28 = %c0_i64, %arg29 = %c23_i64) : (i64, i64) -> (i64, i64, i64, i64, f64, !llvm.array<2 x f64>, !llvm.array<2 x f64>, f64, i64, i32) {
%1418 = arith.addi %arg28, %arg29 : i64
%1419 = arith.sitofp %1418 : i64 to f64
%1420 = arith.mulf %1419, %cst_0 {fastmathFlags = #llvm.fastmath} : f64
%1421 = arith.fptosi %1420 : f64 to i64
%1422 = llvm.freeze %1421 : i64
%1423 = arith.addi %1422, %c1_i64 : i64
%1424 = arith.sitofp %1422 : i64 to f64
%1425 = arith.mulf %1424, %cst_6 {fastmathFlags = #llvm.fastmath} : f64
%1426 = arith.mulf %1424, %cst_7 {fastmathFlags = #llvm.fastmath} : f64
%1427 = math.absf %1425 : f64
%1428 = arith.cmpf uge, %cst, %1427 {fastmathFlags = #llvm.fastmath} : f64
%1429 = llvm.insertvalue %1425, %4[0] : !llvm.array<2 x f64>
%1430 = llvm.insertvalue %cst, %1429[1] : !llvm.array<2 x f64>
%1431 = llvm.insertvalue %1425, %4[1] : !llvm.array<2 x f64>
%1432 = arith.select %1428, %1431, %1430 {fastmathFlags = #llvm.fastmath} : !llvm.array<2 x f64>
%1433 = llvm.extractvalue %1432[0] : !llvm.array<2 x f64>
%1434 = llvm.extractvalue %1432[1] : !llvm.array<2 x f64>
%1435 = arith.addf %1433, %1434 {fastmathFlags = #llvm.fastmath} : f64
%1436 = arith.subf %1433, %1435 {fastmathFlags = #llvm.fastmath} : f64
%1437 = arith.addf %1434, %1436 {fastmathFlags = #llvm.fastmath} : f64
%1438 = arith.addf %1426, %1437 {fastmathFlags = #llvm.fastmath} : f64
%1439 = arith.addf %1435, %1438 {fastmathFlags = #llvm.fastmath} : f64
%1440 = arith.cmpf une, %1439, %cst_8 {fastmathFlags = #llvm.fastmath} : f64
%1441:6 = scf.if %1440 -> (i64, i64, i64, i64, i32, i32) {
%1443 = arith.cmpf uge, %1439, %cst_8 {fastmathFlags = #llvm.fastmath} : f64
%1444 = arith.select %1443, %1422, %arg29 {fastmathFlags = #llvm.fastmath} : i64
%1445 = arith.select %1443, %arg28, %1422 {fastmathFlags = #llvm.fastmath} : i64
%1446 = arith.addi %1445, %c1_i64 : i64
%1447 = arith.cmpi slt, %1446, %1444 : i64
%1448 = arith.cmpi sge, %1446, %1444 : i64
%1449 = arith.extui %1448 : i1 to i32
%1450 = arith.extui %1447 : i1 to i32
scf.yield %1445, %1444, %1444, %1446, %1449, %1450 : i64, i64, i64, i64, i32, i32
} else {
scf.yield %5, %5, %5, %5, %c2_i32, %c0_i32 : i64, i64, i64, i64, i32, i32
}
%1442 = arith.trunci %1441#5 : i32 to i1
scf.condition(%1442) %1441#0, %1441#1, %1441#2, %1441#3, %1426, %1431, %1430, %1425, %1423, %1441#4 : i64, i64, i64, i64, f64, !llvm.array<2 x f64>, !llvm.array<2 x f64>, f64, i64, i32
} do {
^bb0(%arg28: i64, %arg29: i64, %arg30: i64, %arg31: i64, %arg32: f64, %arg33: !llvm.array<2 x f64>, %arg34: !llvm.array<2 x f64>, %arg35: f64, %arg36: i64, %arg37: i32):
scf.yield %arg28, %arg29 : i64, i64
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.