This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Restore FastMathFlags of Builder for Vector FDiv Builtins
ClosedPublic

Authored by quinnp on Jul 14 2021, 7:38 AM.

Details

Summary

This patch fixes __builtin_ppc_recipdivf, __builtin_ppc_recipdivd,
__builtin_ppc_rsqrtf, and __builtin_ppc_rsqrtd. FastMathFlags are
set to fast immediately before emitting these builtins. Now the flags
are restored to their previous values after the builtins are emitted.

Diff Detail

Event Timeline

quinnp created this revision.Jul 14 2021, 7:38 AM
quinnp requested review of this revision.Jul 14 2021, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2021, 7:38 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
quinnp retitled this revision from [PowerPC] Vec Div Builtins Restore FMF of Builder to [PowerPC] Restore FastMathFlags of Builder for Vec Div Builtins .Jul 14 2021, 7:39 AM
quinnp added reviewers: nemanjai, Restricted Project, stefanp.
quinnp retitled this revision from [PowerPC] Restore FastMathFlags of Builder for Vec Div Builtins to [PowerPC] Restore FastMathFlags of Builder for Vector FDiv Builtins .
quinnp updated this revision to Diff 358613.Jul 14 2021, 8:18 AM
quinnp retitled this revision from [PowerPC] Restore FastMathFlags of Builder for Vector FDiv Builtins to [PowerPC] Restore FastMathFlags of Builder for Vector FDiv Builtins.

Fixing indentation.

qiucf added a subscriber: qiucf.Jul 14 2021, 7:31 PM
qiucf added inline comments.
clang/lib/CodeGen/CGBuiltin.cpp
15292
quinnp updated this revision to Diff 359093.Jul 15 2021, 12:43 PM
quinnp marked an inline comment as done.

Adressing review comment.

quinnp updated this revision to Diff 359116.EditedJul 15 2021, 1:43 PM

Adding REQUIRES: powerpc-registered target to front end test case.

quinnp updated this revision to Diff 359118.Jul 15 2021, 1:48 PM

Removing a newline.

nemanjai accepted this revision.Jul 16 2021, 4:34 AM

LGTM. Thanks for fixing this.

This revision is now accepted and ready to land.Jul 16 2021, 4:34 AM
quinnp updated this revision to Diff 359338.Jul 16 2021, 8:54 AM

Removing entry checks from front end test and renaming a variable.

This revision was landed with ongoing or failed builds.Jul 20 2021, 7:41 AM
This revision was automatically updated to reflect the committed changes.