public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47061] New: VRP doesn't propagate through x<<=1, but it does for x*=2
@ 2010-12-24 15:28 zsojka at seznam dot cz
  2010-12-24 15:54 ` [Bug tree-optimization/47061] " zsojka at seznam dot cz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-24 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: VRP doesn't propagate through x<<=1, but it does for
                    x*=2
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22850
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22850
testcase

The attached testcase should be optimised to "return 0;", as it is when
x <<= 1;
is replaced by
x *= 2;

$ gcc -O3 pr47061.c -fdump-tree-vrp -S -masm=intel
shows in the .vrp1/2 dumps (among others):

x_1: [-10, -9]
x_2: [-10, -8]
x_3: [-10, -7]
x_4: [-10, -6]
x_11: [-9, -8]
x_14: [-9, -7]
x_17: [-9, -6]
x_18: VARYING

...

<bb 10>:
  # x_4 = PHI <x_3(8), x_17(9)>
  x_18 = x_4 << 2;

Neither gcc version I tested works (3.3.6-4.6.0)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-29 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-24 15:28 [Bug tree-optimization/47061] New: VRP doesn't propagate through x<<=1, but it does for x*=2 zsojka at seznam dot cz
2010-12-24 15:54 ` [Bug tree-optimization/47061] " zsojka at seznam dot cz
2010-12-24 19:25 ` zsojka at seznam dot cz
2010-12-28 15:04 ` rguenth at gcc dot gnu.org
2012-06-29 14:25 ` rguenth at gcc dot gnu.org
2012-06-29 14:27 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).