This is an archive of the discontinued LLVM Phabricator instance.

Revert some auto-generated checks where a wildcard was needed
ClosedPublic

Authored by andrew.w.kaylor on Aug 24 2023, 10:44 AM.

Details

Summary

This change reverts a batch of autogenerated checks in the pow-exp.ll file where a previous version had used wildcards to account for minor variations in constant folding by different math libraries. The file is also updated to add a comment that will prevent future autogeneration.

The autogenerated changes being reverted are among the changes here: https://github.com/intel-restricted/applications.compilers.llvm-project/commit/2caaec65c04ea7d0e9568b7895b7a46d6100cb75#diff-e800a6ae456ef1224d5a4e6f1f5145732f36b4f84b21d35c671c14ca7d158364

See: https://discourse.llvm.org/t/auto-generated-checks-with-inexact-fp-results/71713

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 10:44 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
andrew.w.kaylor requested review of this revision.Aug 24 2023, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 10:44 AM

Can you change the constants to values that don't suffer from accuracy problems instead?

Can you change the constants to values that don't suffer from accuracy problems instead?

I don't think so -- at least not in all cases. For example, some of these checks are verifying that the pow(C,x) -> exp2(log2(C)*x) transformation happens in the presence of fast-math flags. If the computation returns an exact result, the fast-math flag isn't required.

Example: https://godbolt.org/z/MxjYbs6Ys

nikic accepted this revision.Aug 24 2023, 2:23 PM

LGTM

This revision is now accepted and ready to land.Aug 24 2023, 2:23 PM