aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Preprocessor/init-riscv.c
diff options
context:
space:
mode:
authorPengcheng Wang <wangpengcheng.pp@bytedance.com>2025-11-11 14:16:05 +0800
committerGitHub <noreply@github.com>2025-11-11 14:16:05 +0800
commit957f929eba875e4aeb25c6d8340575a6edb8588d (patch)
tree61669a9691e24446d0bdd01cddf8109741efde0a /clang/test/Preprocessor/init-riscv.c
parent1b4f226ad951f1c163c57a37aac1c97e446b2591 (diff)
downloadllvm-957f929eba875e4aeb25c6d8340575a6edb8588d.zip
llvm-957f929eba875e4aeb25c6d8340575a6edb8588d.tar.gz
llvm-957f929eba875e4aeb25c6d8340575a6edb8588d.tar.bz2
[RISCV] Set __GCC_CONSTRUCTIVE_SIZE/__GCC_DESTRUCTIVE_SIZE to 64 (#162986)
These two macros were added in https://github.com/llvm/llvm-project/pull/89446. But the previous values may not be reasonable for RV64 systems because most of them have a cache line size 64B. So here we change them to 64.
Diffstat (limited to 'clang/test/Preprocessor/init-riscv.c')
-rw-r--r--clang/test/Preprocessor/init-riscv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/init-riscv.c b/clang/test/Preprocessor/init-riscv.c
new file mode 100644
index 0000000..4eeecccf
--- /dev/null
+++ b/clang/test/Preprocessor/init-riscv.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -E -dM -triple=riscv32 < /dev/null | \
+// RUN: FileCheck -match-full-lines -check-prefixes=RV32 %s
+// RUN: %clang_cc1 -E -dM -triple=riscv64 < /dev/null | \
+// RUN: FileCheck -match-full-lines -check-prefixes=RV64 %s
+
+// RV32: #define __GCC_CONSTRUCTIVE_SIZE 64
+// RV32: #define __GCC_DESTRUCTIVE_SIZE 64
+
+// RV64: #define __GCC_CONSTRUCTIVE_SIZE 64
+// RV64: #define __GCC_DESTRUCTIVE_SIZE 64