[flang] Fix simplify intrinsic for count not checking for rank = 0 properly
authorSacha Ballantyne <Sacha.Ballantyne@arm.com>
Mon, 30 Jan 2023 11:50:59 +0000 (11:50 +0000)
committerMats Petersson <mats.petersson@arm.com>
Mon, 30 Jan 2023 12:23:37 +0000 (12:23 +0000)
commitbb94d33aac2a617a762d0662648f8ec496c4c364
tree470ce93287e9d1f32b56f80339ae464884c2fe30
parent8b4d263799e15e287ce1722eec5a133dd86aa06c
[flang] Fix simplify intrinsic for count not checking for rank = 0 properly

Simple fix to check for rank in the same way as other intrinsics to allow
runtime count to take over when dealing with unknown dimension arrays.

Fixes #60356

Reviewed By: Leporacanthicus

Differential Revision: https://reviews.llvm.org/D142877
flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
flang/test/Transforms/simplifyintrinsics.fir