This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/37262] Two branches of the same condition being emitted
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Aug 2008 01:41:45 -0000
- Subject: [Bug rtl-optimization/37262] Two branches of the same condition being emitted
- References: <bug-37262-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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