[clang] ddb7042 - [clang][test][RISCV] Introduce separate RUN lines for __risv_i test in riscv-target-features.c
Alex Bradbury via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 14 13:07:15 PST 2023
Author: Alex Bradbury
Date: 2023-02-14T21:06:44Z
New Revision: ddb704247b16002d916bba67e3aa9f54fd4bbace
URL: https://github.com/llvm/llvm-project/commit/ddb704247b16002d916bba67e3aa9f54fd4bbace
DIFF: https://github.com/llvm/llvm-project/commit/ddb704247b16002d916bba67e3aa9f54fd4bbace.diff
LOG: [clang][test][RISCV] Introduce separate RUN lines for __risv_i test in riscv-target-features.c
Craig Topper pointed out in post-commit review of d05e1e99b1d that the
series of CHECK-NOT lines followed by CHECK would not work as intended
if __riscv_i came first in the input and was followed by the disallowed
lines.
The simplest solution is to just introduced separate RUN lines for the
__riscv_i check.
Added:
Modified:
clang/test/Preprocessor/riscv-target-features.c
Removed:
################################################################################
diff --git a/clang/test/Preprocessor/riscv-target-features.c b/clang/test/Preprocessor/riscv-target-features.c
index 139c84b08f16a..31bddb97d7fbf 100644
--- a/clang/test/Preprocessor/riscv-target-features.c
+++ b/clang/test/Preprocessor/riscv-target-features.c
@@ -49,6 +49,11 @@
// CHECK-NOT: __riscv_zcd {{.*$}}
// CHECK-NOT: __riscv_zcf {{.*$}}
// CHECK-NOT: __riscv_h {{.*$}}
+
+// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32i -x c -E -dM %s \
+// RUN: -o - | FileCheck %s
+// RUN: %clang -target riscv64-unknown-linux-gnu -march=rv64i -x c -E -dM %s \
+// RUN: -o - | FileCheck %s
// CHECK: __riscv_i 2000000{{$}}
// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32im -x c -E -dM %s \
More information about the cfe-commits
mailing list