Closed CelestineSmith closed 1 year ago
@llvm/issue-subscribers-mlir
We have introduced the support for the vector type and confirmed the issue is not reproduced in the current HEAD branch.
https://github.com/llvm/llvm-project/commit/711c58938f36d91af1dc4209946bcf5e70869445
./bin/mlir-opt --test-expand-math temp.mlir
module {
func.func @func(%arg0: vector<4xf32>) {
%cst = arith.constant dense<1.000000e+00> : vector<4xf32>
%cst_0 = arith.constant dense<2.000000e+00> : vector<4xf32>
%cst_1 = arith.constant dense<0.000000e+00> : vector<4xf32>
%0 = arith.mulf %arg0, %cst_0 : vector<4xf32>
%1 = arith.negf %0 : vector<4xf32>
%2 = math.exp %1 : vector<4xf32>
%3 = arith.subf %cst, %2 : vector<4xf32>
%4 = arith.addf %2, %cst : vector<4xf32>
%5 = arith.divf %3, %4 : vector<4xf32>
%6 = math.exp %0 : vector<4xf32>
%7 = arith.subf %6, %cst : vector<4xf32>
%8 = arith.addf %6, %cst : vector<4xf32>
%9 = arith.divf %7, %8 : vector<4xf32>
%10 = arith.cmpf oge, %arg0, %cst_1 : vector<4xf32>
%11 = arith.select %10, %5, %9 : vector<4xi1>, vector<4xf32>
vector.print %11 : vector<4xf32>
return
}
}
MLIR built at commit https://github.com/llvm/llvm-project/commit/034bab4c Reproduced with:
temp.mlir
:trace: