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/37262] Two branches of the same condition being emitted



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-30 01:41 -------
I have seen this in other cases even for the non doloop case, though I don't
know if it is because of -O1 or because it is not removing it.
Testcase:
int _bfd_xcoff_canonicalize_dynamic_reloc (unsigned long long l_symndx)
{
  if (l_symndx < 3)
    {
      switch (l_symndx)
      {
        case 0:
        case 1:
         break;
        case 2:
         return _bfd_abort ();
    }
  }
}
--- CUT ---
Compile at -O1 on powerpc-linux and you will see the double branches:
        bne 0,.L7
        bne 0,.L8


-- 


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


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