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 c/57278] New: -fno-if-conversion and -fno-if-conversion2 do not work as intended


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

            Bug ID: 57278
           Summary: -fno-if-conversion and -fno-if-conversion2 do not work
                    as intended
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shiwen.hu at gmail dot com

Created attachment 30115
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30115&action=edit
test code and binaries

I tried to use "-fno-if-conversion -fno-if-conversion2" in GCC 4.8.0 targeting
ARM cortex-a15 to replace predicated instructions with branches. However, the
compiled binaries still contain predicated instructions, disregarding whether
generating Thumb or ARM code. Attached are the source code and the two
binaries. Can someone look into the issue?

Below are the commands I used to compile the binaries:

FLAGS="-mfloat-abi=hard -static -static-libgcc -mcpu=cortex-a15
-mtune=cortex-a15 -mfpu=neon-vfpv4 -O3"

$CC $FLAGS -marm -fno-if-conversion -fno-if-conversion2 test_cond.c test_data.c
-o test_cond.a32.nocond.exe
$CC $FLAGS -mthumb -fno-if-conversion -fno-if-conversion2 test_cond.c
test_data.c -o test_cond.t32.nocond.exe

In another note, the code is not optimal in that two of the three sign
extensions in the main function assembly can be moved outside the main loop.

Thanks,

Shiwen


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