blob: 05818083d7a37e65e0e4e43ca980d3f49391cc39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 63f99f46e851aecc070496a0e688a0d118c820a4 Mon Sep 17 00:00:00 2001
From: YunQiang Su <yunqiang@isrc.iscas.ac.cn>
Date: Mon, 2 Sep 2024 17:57:52 +0800
Subject: [PATCH] tree-ssa-loop-crc.cc: TARGET_CRC32 may be not defined
TARGET_CRC32 may be not defined on some architectures, RISC-V is one example.
---
gcc/tree-ssa-loop-crc.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/tree-ssa-loop-crc.cc b/gcc/tree-ssa-loop-crc.cc
index b9c2f71ca..7eee9446d 100644
--- a/gcc/tree-ssa-loop-crc.cc
+++ b/gcc/tree-ssa-loop-crc.cc
@@ -1227,6 +1227,9 @@ convert_to_new_loop (class loop *loop)
static unsigned int
tree_ssa_loop_crc ()
{
+#ifndef TARGET_CRC32
+ return 0;
+#else
if (TARGET_CRC32 == false)
{
warning (OPT____,"The loop-crc optimization is not working." \
@@ -1269,6 +1272,7 @@ tree_ssa_loop_crc ()
}
}
return todo;
+#endif
}
/* Loop crc. */
--
2.33.0
|