27 lines
1009 B
Diff
27 lines
1009 B
Diff
From 92dc99425b2566e8cc9cba7cec8774911db0c654 Mon Sep 17 00:00:00 2001
|
|
From: XingYuShuai <1150775134@qq.com>
|
|
Date: Fri, 2 Feb 2024 15:55:07 +0800
|
|
Subject: [PATCH 1/3] [Loop CRC] Solving the problem of insufficient CRC table.
|
|
|
|
---
|
|
gcc/tree-ssa-loop-crc.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/gcc/tree-ssa-loop-crc.c b/gcc/tree-ssa-loop-crc.c
|
|
index 2dd9e1e3b..26f8e64d1 100644
|
|
--- a/gcc/tree-ssa-loop-crc.c
|
|
+++ b/gcc/tree-ssa-loop-crc.c
|
|
@@ -421,7 +421,8 @@ match_crc_table (tree crc_table)
|
|
tree low_bound = array_ref_low_bound (crc_table);
|
|
tree up_bound = array_ref_up_bound (crc_table);
|
|
tree element_size = array_ref_element_size (crc_table);
|
|
- if (low_bound == NULL || up_bound == NULL || element_size == NULL)
|
|
+ if (!tree_fits_uhwi_p(low_bound) || !tree_fits_uhwi_p(up_bound) ||
|
|
+ !tree_fits_uhwi_p(element_size))
|
|
return false;
|
|
unsigned HOST_WIDE_INT lb = tree_to_uhwi (low_bound);
|
|
unsigned HOST_WIDE_INT ub = tree_to_uhwi (up_bound);
|
|
--
|
|
2.33.0
|
|
|