[all-commits] [llvm/llvm-project] 97f0c6: [RISCV] Define _m intrinsics as builtins, instead ...
Kai Wang via All-commits
all-commits at lists.llvm.org
Mon Oct 11 19:48:31 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97f0c63783f52389bd8842df205379ceade7a89d
https://github.com/llvm/llvm-project/commit/97f0c63783f52389bd8842df205379ceade7a89d
Author: Hsiangkai Wang <kai.wang at sifive.com>
Date: 2021-10-12 (Tue, 12 Oct 2021)
Changed paths:
M clang/include/clang/Basic/IdentifierTable.h
M clang/include/clang/Basic/riscv_vector.td
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vaadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamoadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamoand.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamomax.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamomin.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamoor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamoswap.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vamoxor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vand.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vasub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vcompress.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vdiv.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfabs.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfclass.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfcvt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfdiv.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfirst.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmax.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmin.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmul.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmv.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfncvt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfneg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfrdiv.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfrec7.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfrsqrt7.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfrsub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfsgnj.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfslide1down.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfslide1up.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfsqrt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfsub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwcvt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwmul.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwsub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vget.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vle.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vlmul.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vloxei.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vloxseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vlse.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vlseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vlsseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vluxei.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vluxseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmand.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmax.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmfeq.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmfge.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmfgt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmfle.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmflt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmfne.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmin.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmmv.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmnand.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmnor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmnot.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsbc.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsbf.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmseq.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsge.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsgt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsif.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsle.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmslt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsne.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmsof.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmul.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmxnor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmxor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnclip.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vncvt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vneg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnot.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnsra.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnsrl.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vpopc.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vreinterpret.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vrem.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vrgather.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vrsub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vse.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vset.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsext.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vslide1down.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vslide1up.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsll.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsmul.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsoxei.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsoxseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsra.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsrl.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsse.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vssra.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vssrl.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vssseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vssub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsuxei.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsuxseg.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vwadd.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vwcvt.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vwmul.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vwsub.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vxor.c
M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vzext.c
M clang/test/CodeGen/RISCV/rvv-intrinsics/vadd-policy.c
M clang/utils/TableGen/RISCVVEmitter.cpp
Log Message:
-----------
[RISCV] Define _m intrinsics as builtins, instead of macros.
In the original design, we levarage _mt intrinsics to define macros for
_m intrinsics. Such as,
```
__builtin_rvv_vadd_vv_i8m1_mt((vbool8_t)(op0), (vint8m1_t)(op1), (vint8m1_t)(op2), (vint8m1_t)(op3), (size_t)(op4), (size_t)VE_TAIL_AGNOSTIC)
```
However, we could not define generic interface for mask intrinsics any
more due to clang_builtin_alias only accepts clang builtins as its
argument.
In the example,
```
__rvv_overloaded
__attribute__((clang_builtin_alias(__builtin_rvv_vadd_vv_i8m1_mt)))
vint8m1_t vadd(vbool8_t op0, vint8m1_t op1, vint8m1_t op2, vint8m1_t
op3, size_t op4, size_t op5);
```
op5 is the tail policy argument. When users want to use vadd generic
interface for masked vector add, they need to specify tail policy in the
previous design. In this patch, we define _m intrinsics as clang
builtins to solve the problem.
Differential Revision: https://reviews.llvm.org/D110684
More information about the All-commits
mailing list