This is an archive of the discontinued LLVM Phabricator instance.

Fix complex types declared using mode TC
ClosedPublic

Authored by eandrews on Nov 1 2021, 5:58 PM.

Details

Summary

This patch reverts incorrect IR - introduced in commit d11ec6f67e45 (https://reviews.llvm.org/rGd11ec6f67e45c630ab87bfb6010dcc93e89542fc) - for complex types declared using attribute((mode(TC))). TC mode corresponds to __float128 type.

Diff Detail

Event Timeline

eandrews requested review of this revision.Nov 1 2021, 5:58 PM
eandrews created this revision.
rjmccall accepted this revision.Nov 1 2021, 6:33 PM

For posterity in case someone tracks down this review: TC corresponds to an unspecified 128-bit format, which on some targets is a double-double format (like __ibm128_t) and on others is float128_t. The bug in the previous patch is that long double is only safe to use when it's known to be one of those formats.

Patch LGTM.

This revision is now accepted and ready to land.Nov 1 2021, 6:33 PM
qiucf accepted this revision.Nov 2 2021, 2:25 AM

Thanks. This issue looks a little bit like D109943.

For posterity in case someone tracks down this review: TC corresponds to an unspecified 128-bit format, which on some targets is a double-double format (like __ibm128_t) and on others is float128_t. The bug in the previous patch is that long double is only safe to use when it's known to be one of those formats.

Patch LGTM.

Thanks for the note. I'll update the commit message when I check this in.

This revision was landed with ongoing or failed builds.Nov 2 2021, 12:01 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2021, 12:01 PM