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 rtl-optimization/60043] New: -fschedule-insns2 breaks anti-dependency


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

            Bug ID: 60043
           Summary: -fschedule-insns2 breaks anti-dependency
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
            Target: x86_64-*-*

int foo (long long *a, short *b, int n)
{
  *a = (long long)(n * 100);

  return (*b) + 1000;
}

produces at -O2

foo:
.LFB0:
        .cfi_startproc
        imull   $100, %edx, %edx
        movswl  (%rsi), %eax
        movslq  %edx, %rdx
        movq    %rdx, (%rdi)
        addl    $1000, %eax
        ret

fixed by -fno-schedule-insns2.


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