21 Star 26 Fork 101

src-openEuler / gcc

 / 详情

[22.03 LTS]选项-O3 -fselective-scheduling2 -ftrapv -fira-loop-pressure -frename-registers -fnon-call-exceptions -fsel-sched-pipelining -fexceptions运行结果不一致

已完成
缺陷
创建于  
2024-06-03 09:49

【标题描述】选项-O3 -fselective-scheduling2 -ftrapv -fira-loop-pressure -frename-registers -fnon-call-exceptions -fsel-sched-pipelining -fexceptions运行结果不一致

一、缺陷信息
【环境信息】
软件信息

  • OS版本及分支信息:openEuler-22.03-LTS
  • 内核信息:5.10.0-60.18.0.50.oe2203.aarch64
  • 发现问题的组件版本信息:gcc-10.1.1-10.oe2203.aarch64

【问题复现步骤】

gcc -w -g -O3  csmith_20240528_142820_219.c -o csmith_20240528_142820_219
./csmith_20240528_142820_219
gcc -w -g -O3 -fselective-scheduling2  -ftrapv -fira-loop-pressure -frename-registers -fnon-call-exceptions -fsel-sched-pipelining -fexceptions csmith_20240528_142820_219.c -o csmith_20240528_142820_219
./csmith_20240528_142820_219

【实际结果】
运行结果不一致
输入图片说明
开源gcc编译的结果和-O3是一样的
输入图片说明

附件
纪晓慧 2024-06-04 11:22

评论 (5)

纪晓慧 创建了缺陷

Hi jixiaohuiyou, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Compiler, and any of the maintainers: @Noah , @eastb233 , @kuen , @编译小伙 , @huangxiaoquan , @cf-zhao , @周磊 , @stubCode , @Haijian.Zhang , @熊洲

openeuler-ci-bot 添加了
 
sig/Compiler
标签
纪晓慧 修改了描述
纪晓慧 优先级设置为主要
纪晓慧 里程碑设置为openEuler-22.03-LTS
纪晓慧 负责人设置为wangding16

22.03-LTS-SP4上也能复现相同问题
输入图片说明

经定位,是commit bdb0f40cea4aa1a92ead381b645363ae0571c065引入的问题,请相关责任人进一步分析。

commit bdb0f40cea4aala92ead381b645363ae0571c065(HEAD)
Author: zhanghaijian <z.zhanghaijianchuawei.com>
Date:l Mon Jul 12 10:36:15 2021 4+0800
[Backport]tree-optimization: Avoid issueing loads in SM when possible
Reference:https://gcc.gnu.org/git/?p=gcc.git;a=Commit;h=f9elea10e657af9fb02fafecfla600740fd34409
Currently store-motion emits a load of the value in the loop
preheader even when the original loop does not contain any read
of the reference. This avoids doing this. In the conditional
store-motion case we need to mark the sunk stores with no-warning
since the control dependence is too tricky to figure out for
the uninit warning.

编译小伙 负责人wangding16 修改为eastb233
编译小伙 任务状态待办的 修改为修复中
eastb233 通过openeuler/gcc Pull Request !209任务状态修复中 修改为已完成

PR合入后,验证如下

输入图片说明

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/gcc.git
git@gitee.com:src-openeuler/gcc.git
src-openeuler
gcc
gcc

搜索帮助

344bd9b3 5694891 D2dac590 5694891