This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix a bug with simplified minloc that treated logicals with even values > 1 as 0
ClosedPublic

Authored by SBallantyne on Feb 28 2023, 8:19 AM.

Details

Summary

Previously the mask would be loaded as the appropriate integer type and cast to I1 to pass to
fir.if, however this truncates the integer and so would cast 6 to 0. By loading values as logicals
and casting to I1 this problem is avoided.

Diff Detail

Event Timeline

SBallantyne created this revision.Feb 28 2023, 8:19 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 28 2023, 8:19 AM
SBallantyne requested review of this revision.Feb 28 2023, 8:19 AM
This revision is now accepted and ready to land.Feb 28 2023, 8:34 AM