This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/67971] New: Failure to unify conditional argument selection with conditional result selection


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67971

            Bug ID: 67971
           Summary: Failure to unify conditional argument selection with
                    conditional result selection
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---

We don't optimise:

int
f1 (int cond, double x, double y)
{ 
  double z1, z2;

  if (cond)
    z1 = __builtin_cos (x);
  else
    z1 = __builtin_cos (y);
  z2 = __builtin_cos (cond ? x : y);
  return z1 == z2;
}

to "return 1" at -O2.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]