This is an archive of the discontinued LLVM Phabricator instance.

[flang] Use llvm.zext when converting from i1 -> iXX
ClosedPublic

Authored by clementval on Mar 13 2023, 1:17 PM.

Details

Summary

CodeGen used llvm.sext when converting fir.convert %0 : (i1) -> iXX
where iXX is any integer. This leads to wrong values when the initial
i1 is equal to 1.

Diff Detail

Event Timeline

clementval created this revision.Mar 13 2023, 1:17 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 13 2023, 1:17 PM
clementval requested review of this revision.Mar 13 2023, 1:17 PM
PeteSteinfeld edited the summary of this revision. (Show Details)Mar 13 2023, 1:34 PM
PeteSteinfeld accepted this revision.Mar 13 2023, 1:46 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Mar 13 2023, 1:46 PM
This revision was automatically updated to reflect the committed changes.