[flang] Check constant arguments to bit manipulation intrinsics even if not foldable
authorPeter Klausler <pklausler@nvidia.com>
Sat, 17 Dec 2022 18:48:27 +0000 (10:48 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 17 Dec 2022 23:24:59 +0000 (15:24 -0800)
commit4244cab23afcee5c3515d67d6d340cf82ce5289f
tree336b89e3291be4b08bde90d2c135c266de5ad732
parent8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d
[flang] Check constant arguments to bit manipulation intrinsics even if not foldable

When some arguments that specify bit positions, shift counts, and field sizes are
constant at compilation time, but other arguments are not constant, the compiler
should still validate the constant ones.  In the current sources, validation is
only performed for intrinsic references that can be folded to constants.

Differential Revision: https://reviews.llvm.org/D140152
flang/lib/Evaluate/fold-integer.cpp
flang/lib/Evaluate/intrinsics.cpp
flang/test/Evaluate/fold-ishftc.f90
flang/test/Semantics/ishftc.f90