1 Star 0 Fork 140

yangxin/gcc

forked from eastb233/src-openeuler_gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-ICE-during-pass-ccp.patch 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
jdkboy 提交于 2020-08-29 09:39 . Add several enhancement patches
This backport contains 1 patch from gcc main stream tree.
The commit id of these patchs list as following in the order of time.
0001-PR-tree-optimization-94574-aarch64-ICE-during-GIMPLE.patch
f65cecabc32fe12b024253502af953e657e1a878
diff -uprN a/gcc/testsuite/gcc.dg/pr94574.c b/gcc/testsuite/gcc.dg/pr94574.c
--- a/gcc/testsuite/gcc.dg/pr94574.c 1970-01-01 00:00:00.000000000 +0000
+++ b/gcc/testsuite/gcc.dg/pr94574.c 2020-04-15 21:08:48.972000000 +0000
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef unsigned int v4si __attribute__((vector_size(16)));
+typedef unsigned int v2si __attribute__((vector_size(8)));
+
+/* The aliasing is somewhat dubious here, but it must compile. */
+
+v2si
+foo (v4si v)
+{
+ v2si res;
+ *(v4si *) &res = v;
+ return res;
+}
diff -uprN a/gcc/tree-ssa.c b/gcc/tree-ssa.c
--- a/gcc/tree-ssa.c 2020-03-31 01:51:30.000000000 +0000
+++ b/gcc/tree-ssa.c 2020-04-15 21:26:09.828000000 +0000
@@ -1528,7 +1528,9 @@ non_rewritable_lvalue_p (tree lhs)
&& known_gt (wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (decl))),
mem_ref_offset (lhs))
&& multiple_of_p (sizetype, TREE_OPERAND (lhs, 1),
- TYPE_SIZE_UNIT (TREE_TYPE (lhs))))
+ TYPE_SIZE_UNIT (TREE_TYPE (lhs)))
+ && known_ge (wi::to_poly_offset (TYPE_SIZE (TREE_TYPE (decl))),
+ wi::to_poly_offset (TYPE_SIZE (TREE_TYPE (lhs)))))
return false;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anar/gcc.git
git@gitee.com:anar/gcc.git
anar
gcc
gcc
master

搜索帮助