This is an archive of the discontinued LLVM Phabricator instance.

[2/2][RISCV] Model vxrm control for vsadd, vsaddu, vssub, and vssubu
AbandonedPublic

Authored by eopXD on Jun 13 2023, 11:17 PM.

Details

Summary

Depends on D152879.

This patch-set follows the patch-set of D151395. This patch-set seeks
to update all the remaining fixed-point intrinsics to model vxrm
control.

This is the 2nd patch of the patch-set. This patch adds rounding mode
control for vsadd, vsaddu, vssub, and vssubu

For the combining patterns that does not model the rounding mode
control, the value 99 is assigned and RISCVInsertReadWriteCSR will
skip the write to vxrm when encountering such value.

Diff Detail

Event Timeline

eopXD created this revision.Jun 13 2023, 11:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2023, 11:17 PM
eopXD requested review of this revision.Jun 13 2023, 11:17 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 13 2023, 11:17 PM
eopXD updated this revision to Diff 531193.Jun 13 2023, 11:19 PM

Bump CI.

eopXD retitled this revision from [RISCV] Model vxrm control for vsadd, vsaddu, vssub, and vssubu to [2/2][RISCV] Model vxrm control for vsadd, vsaddu, vssub, and vssubu.Jun 15 2023, 3:38 AM
eopXD edited the summary of this revision. (Show Details)
eopXD updated this revision to Diff 531691.Jun 15 2023, 4:11 AM
eopXD edited the summary of this revision. (Show Details)

Changes:

  • Change value to omit vxrm write from 4 to 99
  • Resolve test case failure
  • Be consistent on template naming
eopXD updated this revision to Diff 531721.Jun 15 2023, 6:14 AM

Fixed incorrect pattern that caused test case failure.

SemaChecking.cpp?

craig.topper added a comment.EditedJun 15 2023, 10:13 AM

These instructions don't read vxrm why do they need to change?

Posted the same question here https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/222

eopXD abandoned this revision.Jun 15 2023, 7:11 PM

Dropping the revision because no change in vsadd(u)/vssub(u) is needed since the computation does not consider rounding mode.