This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix a test case failure when compiled with libcxx
ClosedPublic

Authored by Conanap on Aug 18 2021, 10:23 PM.

Details

Summary

The test case is not ran unless libcxx is used, and a macro
may be undefined. This patch checks for the definition of the
macro before using it.

Diff Detail

Event Timeline

Conanap created this revision.Aug 18 2021, 10:23 PM
Conanap requested review of this revision.Aug 18 2021, 10:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2021, 10:23 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Conanap edited reviewers, added: Restricted Project, nemanjai, saghir; removed: Restricted Project.Aug 18 2021, 10:24 PM
Conanap edited projects, added Restricted Project, Restricted Project; removed Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2021, 10:24 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Conanap removed a reviewer: Restricted Project.Aug 18 2021, 10:24 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 18 2021, 10:24 PM

LGTM mod comment.

libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
95

Please De-Morgan-ize this condition, for readability. Make it:

#if defined(__PPC__) && __LONG_DOUBLE_128__ && !(defined(__LONG_DOUBLE_IEEE128__) && __LONG_DOUBLE_IEEE128__)
Mordante accepted this revision as: Mordante.Aug 19 2021, 11:41 AM
Mordante added subscribers: ldionne, Mordante.

Please update the description of this patch to address @ldionne's review comment https://reviews.llvm.org/D108071#2950754
Other than that and @Quuxplusone's comment LGTM.

Conanap updated this revision to Diff 367588.Aug 19 2021, 12:22 PM

De Morgan's for readability

Conanap marked an inline comment as done.Aug 19 2021, 12:22 PM
Conanap added inline comments.
libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
95

updated, thanks!

ldionne accepted this revision.Aug 20 2021, 10:23 AM

LGTM, I'll commit this (and reference http://llvm.org/PR51430 in the commit message), and cherry-pick it to release/13.x

This revision is now accepted and ready to land.Aug 20 2021, 10:23 AM