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/29789] Missed invariant out of the loop with conditionals and shifts



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-04-20 13:51 -------
Mine.  I have a tree if-conversion patch that produces

<L0>:;
  D.1993 = MEM[base: state, index: ivtmp.32, step: 8];
  if (pretmp.25 == (pretmp.25 & D.1993)) goto <L1>; else goto <L3>;

<L1>:;
  MEM[base: state, index: ivtmp.32, step: 8] = 1 << target ^ D.1993;

<L3>:;
  ivtmp.32 = ivtmp.32 + 1;
  if (size > (int) ivtmp.32) goto <L0>; else goto <L6>;

and finally

.L4:
        movq    (%r11,%r9,8), %rdi
        movq    %rsi, %rax
        andq    %rdi, %rax
        cmpq    %rax, %rsi
        jne     .L5
        xorq    %rdx, %rdi
        movq    %rdi, (%r11,%r9,8)
.L5:
        addq    $1, %r9
        cmpl    %r9d, %r8d
        jg      .L4

for the inner loop.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-11-10 01:55:58         |2007-04-20 13:51:52
               date|                            |


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


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