This is an archive of the discontinued LLVM Phabricator instance.

[12/15][Clang][RISCV][NFC] Refine the way to check for Policy in riscv_vector_builtin_cg.inc
ClosedPublic

Authored by eopXD on Jan 15 2023, 4:21 AM.

Details

Summary

The current way creates a fallacy that checking for
PolicyAttrs == TAIL_AGNOSTIC is implicitly equivalant to
TAIL_AGNOSTIC_MASK_UNDISTURBED. This works under the assumption that
an unmasked intrinsic has a policy of TAMU. The expression here is
mis-leading and will not be correct when the default policy is not
TAMU.

As this patch-set targets to change the default policy from TAMU to
TAMA, this commit is necessary before changing the default.

This is the 12th commit of a patch-set that aims to change the default policy
for RVV intrinsics from TAMU to TAMA.

Please refer to the cover letter in the 1st commit (D141573) for an
overview.

Diff Detail

Event Timeline

eopXD created this revision.Jan 15 2023, 4:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2023, 4:21 AM
eopXD requested review of this revision.Jan 15 2023, 4:21 AM
eopXD retitled this revision from [WIP][12/N][Clang][RISCV][NFC] Refine the way to check for Policy in riscv_vector_builtin_cg.inc to [12/15][Clang][RISCV][NFC] Refine the way to check for Policy in riscv_vector_builtin_cg.inc.Jan 15 2023, 7:58 AM
eopXD edited the summary of this revision. (Show Details)
craig.topper added inline comments.Jan 17 2023, 4:50 PM
clang/include/clang/Support/RISCVVIntrinsicUtils.h
431

simultaes -> simulates

clang/lib/CodeGen/CGBuiltin.cpp
19484

simultaes -> simulates

eopXD updated this revision to Diff 490386.Jan 19 2023, 12:16 AM
eopXD edited the summary of this revision. (Show Details)

Update code: Address review comment from Craig.

This revision is now accepted and ready to land.Jan 19 2023, 12:21 AM
This revision was landed with ongoing or failed builds.Jan 24 2023, 8:28 AM
This revision was automatically updated to reflect the committed changes.