explicit ordering among operands

This commit is contained in:
Tian Jin 2019-12-24 03:36:33 -05:00
parent 44f9f8324c
commit eadf33d816
1 changed files with 3 additions and 3 deletions

View File

@ -331,9 +331,9 @@ Value *mapToLowerScalarOp<ONNXTanhOp>(Operation *op,
auto neg = rewriter.create<SubFOp>(loc, zero, operand);
auto exp = rewriter.create<ExpOp>(loc, operand);
auto negExp = rewriter.create<ExpOp>(loc, neg);
auto result =
rewriter.create<DivFOp>(loc, rewriter.create<SubFOp>(loc, exp, negExp),
rewriter.create<AddFOp>(loc, exp, negExp));
auto diff = rewriter.create<SubFOp>(loc, exp, negExp);
auto sum = rewriter.create<AddFOp>(loc, exp, negExp);
auto result = rewriter.create<DivFOp>(loc, diff, sum);
return result;
}