Page MenuHomePhabricator

[RISCV][RVV] Add a writefrm insert pass to support vfcvt with static rounding mode
Needs ReviewPublic

Authored by arcbbb on Apr 8 2022, 2:31 AM.



V spec says vfcvt instructions use the round mode in frm, except for the rtz variants.
To implement floor/ceil with vfcvt instructions, we can change the frm to rdn/rup temporarily.

Following D122860, this patch provides a pass that insert writefrm for pseudos having FPRndModeOp and adds an intrinsic vfcvt.rdn.x.f.v for testing the purpose.
For now it only works for non-strictfp functions.

Diff Detail