This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Mark function calls as possibly changing FPCR
ClosedPublic

Authored by sepavloff on Jan 31 2023, 11:10 AM.

Details

Summary

This patch does the same changes as D111433 for PowerPC and D139549 for
X86, - in the strictfp function all calls are marked as implicit defs of
FPCR. It prevents from moving FP operations across function calls, which
may change rounding mode, as fesetround does.

Diff Detail

Event Timeline

sepavloff created this revision.Jan 31 2023, 11:10 AM
sepavloff requested review of this revision.Jan 31 2023, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 11:10 AM
efriedma accepted this revision.Jan 31 2023, 11:33 AM

LGTM

llvm/lib/Target/AArch64/AArch64ISelLowering.h
673

Not exactly part of this patch, but can you make getRoundingControlRegisters return an ArrayRef<MCPhysReg> instead of the weird thing you're doing with a raw pointer?

This revision is now accepted and ready to land.Jan 31 2023, 11:33 AM
This revision was landed with ongoing or failed builds.Jan 31 2023, 9:07 PM
This revision was automatically updated to reflect the committed changes.