This is an archive of the discontinued LLVM Phabricator instance.

[AIX][test-suite] Utilize `INT_MAX` instead of `RAND_MAX` on AIX (ocean and srad benchmarks)
ClosedPublic

Authored by amyk on May 24 2021, 8:29 PM.

Details

Summary

For the ocean and srad benchmarks, RAND_MAX is used and is expected to be 2147483647.
However, RAND_MAX on AIX is actually 32767. Thus, we use INT_MAX instead as INT_MAX is 2147483647.

Diff Detail

Repository
rT test-suite

Event Timeline

amyk requested review of this revision.May 24 2021, 8:29 PM
amyk created this revision.
amyk added a subscriber: ZarkoCA.Aug 16 2021, 7:23 AM

Gentle ping.
@hubert.reinterpretcast @ZarkoCA @stevewan @daltenty Did any of you have any comments regarding this change?

amyk added a comment.Sep 14 2021, 10:04 AM

Gentle ping.

Perhaps consider using 2147483647.0 directly as the divisor so that no extra header is needed?

amyk updated this revision to Diff 372848.Sep 15 2021, 6:35 PM

Address @stevewan's review comment to use 2147483647 instead of including a new header.
I have tried to define a macro to represent 2147483647 on AIX.

Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2021, 6:35 PM
stevewan accepted this revision as: stevewan.Sep 16 2021, 11:06 AM

LGTM with minor nit. Thanks.

MultiSource/Benchmarks/Rodinia/srad/main.c
86

nit: The indentation is slightly different from the change in the other file. Possibly run through clang-format to make sure.

This revision is now accepted and ready to land.Sep 16 2021, 11:06 AM
This revision was landed with ongoing or failed builds.Nov 25 2021, 7:26 AM
This revision was automatically updated to reflect the committed changes.