khchen created this revision. khchen added reviewers: craig.topper, rogfer01, HsiangKai, evandro, liaolucy. Herald added subscribers: vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb. khchen requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang.
1. Skip the temporary file 2. Test cc1 with -S to verify codegen work well. Add '-target-feature +m' because the backend requires it to calculate the vscaled size/offset. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D99082 Files: clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vadd.c clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vfadd.c clang/test/CodeGen/RISCV/rvv-intrinsics/vadd.c clang/test/CodeGen/RISCV/rvv-intrinsics/vfadd.c clang/test/CodeGen/RISCV/rvv-intrinsics/vle.c clang/test/CodeGen/RISCV/rvv-intrinsics/vse.c clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvl.c clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvlmax.c
Index: clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvlmax.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvlmax.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvlmax.c @@ -4,8 +4,8 @@ // RUN: | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +experimental-v -emit-llvm -o - %s \ // RUN: | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +experimental-v -Werror -Wall -o - \ -// RUN: %s > /dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvl.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvl.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics/vsetvl.c @@ -4,8 +4,8 @@ // RUN: | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +experimental-v -emit-llvm -o - %s \ // RUN: | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +experimental-v -Werror -Wall -o - \ -// RUN: %s > /dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics/vse.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics/vse.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics/vse.c @@ -3,8 +3,8 @@ // RUN: -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ // RUN: -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ -// RUN: -Werror -Wall -o - %s >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +f -target-feature +d -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics/vle.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics/vle.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics/vle.c @@ -3,8 +3,8 @@ // RUN: -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ // RUN: -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ -// RUN: -Werror -Wall -o - %s >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +f -target-feature +d -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics/vfadd.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics/vfadd.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics/vfadd.c @@ -3,9 +3,8 @@ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ -// RUN: -target-feature +experimental-zfh -Werror -Wall -o - %s >/dev/null 2>%t -// RUN: FileCheck --check-prefix=ASM --allow-empty %s <%t +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +f -target-feature +d -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics/vadd.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics/vadd.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics/vadd.c @@ -3,9 +3,8 @@ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ -// RUN: -target-feature +experimental-zfh -Werror -Wall -o - %s >/dev/null 2>%t -// RUN: FileCheck --check-prefix=ASM --allow-empty %s <%t +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vfadd.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vfadd.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vfadd.c @@ -3,9 +3,8 @@ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ -// RUN: -target-feature +experimental-zfh -Werror -Wall -o - %s >/dev/null 2>%t -// RUN: FileCheck --check-prefix=ASM --allow-empty %s <%t +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +f -target-feature +d -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector_generic.h> Index: clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vadd.c =================================================================== --- clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vadd.c +++ clang/test/CodeGen/RISCV/rvv-intrinsics-generic/vadd.c @@ -3,9 +3,8 @@ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV32 %s // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ // RUN: -target-feature +experimental-zfh -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck --check-prefix=CHECK-RV64 %s -// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-feature +experimental-v \ -// RUN: -target-feature +experimental-zfh -Werror -Wall -o - %s >/dev/null 2>%t -// RUN: FileCheck --check-prefix=ASM --allow-empty %s <%t +// RUN: %clang_cc1 -triple riscv64 -target-feature +m -target-feature +experimental-v \ +// RUN: -Werror -Wall -o - %s -S >/dev/null 2>&1 | FileCheck --check-prefix=ASM --allow-empty %s // ASM-NOT: warning #include <riscv_vector_generic.h>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits