[12/15][Clang][RISCV][NFC] Refine the way to check for Policy in riscv_vector_builtin...
authoreopXD <yueh.ting.chen@gmail.com>
Sun, 15 Jan 2023 12:13:48 +0000 (04:13 -0800)
committereopXD <yueh.ting.chen@gmail.com>
Tue, 24 Jan 2023 16:28:01 +0000 (08:28 -0800)
commit1a803e0b2ad7ea9cfe7fc832210f537fce3f5a51
tree8f3702e0ec4ebbbe49009e41a92ce89fe6aac9e3
parent76f9a6a4e7f32b38458ed9c5c267c4f45b1d69db
[12/15][Clang][RISCV][NFC] Refine the way to check for Policy in riscv_vector_builtin_cg.inc

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.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D141789
clang/include/clang/Basic/riscv_vector.td
clang/include/clang/Support/RISCVVIntrinsicUtils.h
clang/lib/CodeGen/CGBuiltin.cpp