[flang-commits] [PATCH] D129296: Lower mask intrinsics

vdonaldson via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jul 8 10:18:14 PDT 2022


vdonaldson added a comment.

The only fixed requirement for intrinsic implementation is that conformant calls must generate correct results.  Any violation of that requirement is a bug.

For nonconformant calls, performance should almost always take precedence.  An implementation should rarely to never include code to get specific nonconformant results if that penalizes conformant call performance.

There are a half a dozen or so extant compilers that can be checked for comparison, starting with `gfortran` and classic `flang`.  If compilers disagree on nonconformant results, that is usually an indication that conformant call implementations differ.  If compilers agree on nonconformant calls, which often happens, it is likely because they all have the same obvious implementation.

That does leave some wiggle room for nonconformant calls.  There could, for example, be multiple implementations that generate correct conformant call results but different nonconformant results with identical instruction cost.  Function `genIbits` for example, has a comment to that effect.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129296/new/

https://reviews.llvm.org/D129296



More information about the flang-commits mailing list