The testcase from PR40021:
 http://gcc.gnu.org/bugzilla/attachment.cgi?id=17800&action=view
shows a current problem in optimizing away logical operations on logical
(boolean) types, like "x | 1" --> "1".  This folding is done in some contexts,
and not in others.  In particular the testcase
 (with -m32 -O2 -ftree-vectorize -msse2 -mfpmath=sse -ffast-math )
leaves this until expand (it's generated quite early already, so there
are multiple possibilities to fold it):

  D.1650_109 = D.1648_107 | 1;
  if (D.1650_109 != 0)
    goto <bb 6>;
  else
    goto <bb 5>;

Richi already fiddled a bit with this, so CCing him.


-- 
           Summary: missed optimizations on logical types: (x | 1) --> 1
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matz at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40052

Reply via email to