[all-commits] [llvm/llvm-project] 71fd66: [RISCV][Clang] Support RVV policy functions.

Zakk Chen via All-commits all-commits at lists.llvm.org
Mon Aug 1 10:45:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71fd66161d54b5a7ed78a1a94a1cc382cce78060
      https://github.com/llvm/llvm-project/commit/71fd66161d54b5a7ed78a1a94a1cc382cce78060
  Author: Zakk Chen <zakkc at google.com>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M clang/include/clang/Basic/riscv_vector.td
    M clang/include/clang/Support/RISCVVIntrinsicUtils.h
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Sema/SemaRISCVVectorLookup.cpp
    M clang/lib/Support/RISCVVIntrinsicUtils.cpp
    M clang/test/CodeGen/RISCV/riscv-attr-builtin-alias.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmv.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vle.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vloxei.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vlse.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vluxei.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmv.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmv.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vle.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vleff.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vloxei.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vlse.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vluxei.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vmv.c
    M clang/utils/TableGen/RISCVVEmitter.cpp

  Log Message:
  -----------
  [RISCV][Clang] Support RVV policy functions.

1. Add policy functions support and tests for vadd, vmv, vfmv and all load
   instructions except segment load. I didn't add all combination of policy
   functions in test because it seem not to make sense.
2. Rename HasUnMaskedOverloaded to SupportOverloading.
3. vmv.s.x for ta policy could not have overloaded API.
4. This patch does not support all operations, I will have other follow-up
   patches support all.

[RFC] https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/137

Reviewed By: kito-cheng, fakepaper56, fakepaper56

Differential Revision: https://reviews.llvm.org/D126742


  Commit: 8e51917b39cd2387fde0e3ff64805aa794f3016a
      https://github.com/llvm/llvm-project/commit/8e51917b39cd2387fde0e3ff64805aa794f3016a
  Author: Zakk Chen <zakkc at google.com>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vaadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vadc.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/vdiv.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/vfmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmadd.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/vfmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfncvt.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfnmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfnmadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfnmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfnmsub.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/vfwmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwnmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwnmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmax.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmin.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnclip.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vnmsub.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/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/vsbc.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/vslidedown.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vslideup.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/vsra.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsrl.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/vssub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vwadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vwmacc.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/vaadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vadc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vand.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vasub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vdiv.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfclass.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfcvt.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfdiv.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmax.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmin.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfncvt.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfnmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfnmadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfnmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfnmsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfrdiv.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfrec7.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfrsqrt7.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfrsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfsgnj.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfslide1down.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfslide1up.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfsqrt.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwcvt.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwnmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwnmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vfwsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vmadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vmax.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vmin.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vnclip.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vnmsac.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vnmsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vnsra.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vnsrl.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vor.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vrem.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vrgather.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vrsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsbc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsext.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vslide1down.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vslide1up.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vslidedown.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vslideup.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsll.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsra.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsrl.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vssra.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vssrl.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vssub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vwadd.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vwmacc.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vwmul.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vwsub.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vxor.c
    M clang/test/CodeGen/RISCV/rvv-intrinsics/vzext.c

  Log Message:
  -----------
  [RISCV][Clang] Add tests for all supported policy functions. (NFC)

In order to make the review easier, I split a lot of tests from
https://reviews.llvm.org/D126742

Reviewed By: rogfer01

Differential Revision: https://reviews.llvm.org/D126743


Compare: https://github.com/llvm/llvm-project/compare/5674a3c88088...8e51917b39cd


More information about the All-commits mailing list