This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Add codegen support for frint
ClosedPublic

Authored by gonglingqin on Sep 5 2022, 11:29 PM.

Details

Summary

According to the revised description in LoongArch Reference Manual v1.02,
frint.[s/d] does not judge whether floating-point inexact exceptions are
allowed indicated by FCSR, i.e. always executes roundToIntegralExact(x).
What's more, the manual also specifically defines that frint.s/d is only
necessary to be defined in LA64. So ISD::FRINT is legal for LA64.

Diff Detail

Event Timeline

gonglingqin created this revision.Sep 5 2022, 11:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 11:29 PM
gonglingqin requested review of this revision.Sep 5 2022, 11:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 11:29 PM
SixWeining accepted this revision.Sep 7 2022, 7:36 PM
This revision is now accepted and ready to land.Sep 7 2022, 7:36 PM
This revision was automatically updated to reflect the committed changes.