[flang-commits] [PATCH] D139351: Lowering and runtime support for F08 transformational intrinsics: BESSEL_JN and BESSEL_YN
Slava Zakharin via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Jan 17 11:27:45 PST 2023
vzakhari added inline comments.
================
Comment at: flang/lib/Lower/IntrinsicCall.cpp:2682
+ mlir::Value cmpXEq0 = builder.create<mlir::arith::CmpFOp>(
+ loc, mlir::arith::CmpFPredicate::UEQ, x, zero);
+ mlir::Value cmpN1LtN2 = builder.create<mlir::arith::CmpIOp>(
----------------
tarunprabhu wrote:
> vzakhari wrote:
> > Hello @tarunprabhu, is unordered predicate here intentional?
> I think I intended this to replicate the behavior of gfortran in the case when x is NaN. I'll have to double-check that though.
Yes, please double-check it, because treating `NaN` argument as zero may not be the right thing to do. We'd better propagate the `NaN` argument to the result.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139351/new/
https://reviews.llvm.org/D139351
More information about the flang-commits
mailing list