1.4K Star 7.6K Fork 1.4K

GVP方舟编译器 / OpenArkCompiler

 / 详情

ctorture tests fail at -O3 with inlining due to recent alias analysis changes

已完成
成员
创建于  
2021-07-27 09:50

The following tests:

pta-field-1.c
pta-field-2.c
pr44468.c
20000605-1.c

fails when compiled:

maple -run=me:mpl2mpl:mplcg -option="-O3:-O2:-O2"

-noDDAA does not help.

In the case of pta-field-1.c, after &bar is inlined into &foo:

func &foo () i32 {
  funcid 2
  var %f <$Foo>
LOC 2 16
  var %i i32
  var %j i32

LOC 2 16
  dassign %i 0 (constval i32 1)
  dassign %j 0 (constval i32 2)
LOC 2 17
  dassign %f 1 (addrof a64 %i)
LOC 2 18
  dassign %f 2 (addrof a64 %j)
  #inlining begin: FUNC bar
LOC 2 10
  iassign <* i32> 0 (
    iread a64 <* <$Foo>> 2 (addrof a64 %f 1),
    constval i32 0)
  #inlining end: FUNC bar
LOC 2 20
  return (dread i32 %j)
}

Alias analysis does not know that the iassign will modify %j. The optimized code returns 2 instead of %j.

评论 (0)

fredchow 创建了任务
fredchow 负责人设置为刘岩
fredchow 任务状态待办的 修改为已完成
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
C++
1
https://gitee.com/openarkcompiler/OpenArkCompiler.git
git@gitee.com:openarkcompiler/OpenArkCompiler.git
openarkcompiler
OpenArkCompiler
OpenArkCompiler

搜索帮助