jkmcnk / sx-gcc

The GNU Compiler Collection port to NEC SX CPU architecture.
GNU General Public License v2.0
0 stars 2 forks source link

-O1 optimizes away SI/DI IF branch #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As said, the attached code becomes trivial with -O1. The problem seems to
be that the if-then-else is replaced by a plain jump insn. The
corresponding edge of the block is deleted (erroneously), because it isn't
recognized as conditional jump (well, it isn't any more). So the bb can be
removed.

This doesn't happen in the same way with SF/DF conditional jumps.

Erich

Original issue reported on code.google.com by efo...@gmail.com on 30 Sep 2008 at 10:04

Attachments:

GoogleCodeExporter commented 8 years ago
Solved after completely rewriting (and replacing) the conditional branch 
generation code.

Erich

Original comment by efo...@gmail.com on 15 Oct 2008 at 11:48

GoogleCodeExporter commented 8 years ago

Original comment by efo...@gmail.com on 15 Oct 2008 at 11:49