[flang-commits] [PATCH] D127805: Bitwise comparison intrinsics

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jul 7 15:13:17 PDT 2022


klausler added a comment.

In D127805#3637311 <https://reviews.llvm.org/D127805#3637311>, @tarunprabhu wrote:

> In D127805#3637195 <https://reviews.llvm.org/D127805#3637195>, @klausler wrote:
>
>> Please add tests for folding the bit comparison intrinsic functions.
>
> I'm not sure what you mean. Do you want me to add tests where all arguments to the intrinsic functions are known constants?

Yes, that's right.  See flang/test/Evaluate/*.f90 to see other constant folding tests.  The general technique is to put foldable expressions as initializers of named constants in modules, with LOGICAL named constants used to verify their results.  If an expression doesn't get folded, the compilation of the module will fail, and if the folded value is incorrect, the module file won't contain a definition of the LOGICAL variable as .true.


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

https://reviews.llvm.org/D127805



More information about the flang-commits mailing list