Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tree-ssa-alias] tree-dse does not use pointer info #33

Open
xiangzhai opened this issue Feb 27, 2018 · 1 comment
Open

[tree-ssa-alias] tree-dse does not use pointer info #33

xiangzhai opened this issue Feb 27, 2018 · 1 comment
Labels
Milestone

Comments

@xiangzhai
Copy link

Hi fellows,

Tom fixed PR67955 for gcc-7-branch, but gcc-6-branch is still able to reproduce the issue:

$ /opt/loongson-gnu-6/bin/mips64-linux-gnu-gcc -O2 -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre -fdump-tree-dse1=/dev/stdout t.c

;; Function f (f, funcdef_no=0, decl_uid=1410, cgraph_uid=0, symbol_order=0)

f ()
{
  int * p;
  int a;
  int _5;

  <bb 2>:
  p_1 = &a;
  *p_1 = 1;
  a = 2;
  _5 = a;
  a ={v} {CLOBBER};
  return _5;

}

gcc 5.5 might not be effected:

$ /opt/loongson-gnu-5.5/bin/mips64-linux-gnu-gcc -O2 -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre -fdump-tree-dse1=/dev/stdout t.c

;; Function f (f, funcdef_no=0, decl_uid=1485, cgraph_uid=0, symbol_order=0)

f ()
{
  int * p;
  int a;

  <bb 2>:
  a_6 = 1;
  a_4 = 2;
  a_5 = 2;
  return 2;

}

Regards,
Leslie Zhai

@xiangzhai xiangzhai added the bug label Feb 27, 2018
@xiangzhai xiangzhai added this to the gcc-6-branch milestone Feb 27, 2018
@xiangzhai
Copy link
Author

Backported for gcc-6-branch:

$ /opt/loongson-gnu-6/bin/mips64-linux-gnu-gcc -O2 -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre -fdump-tree-dse1-details=/dev/stdout t.c

;; Function f (f, funcdef_no=0, decl_uid=1410, cgraph_uid=0, symbol_order=0)

  Deleted dead store '*p_1 = 1;
'
f ()
{
  int * p;
  int a;
  int _5;

  <bb 2>:
  p_1 = &a;
  a = 2;
  _5 = a;
  a ={v} {CLOBBER};
  return _5;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant