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 target/50022] [4.7 regression] "incorrect condition in IT block" when building mozilla code base for ARM


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

Greta Yorsh <Greta.Yorsh at arm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Greta.Yorsh at arm dot com

--- Comment #2 from Greta Yorsh <Greta.Yorsh at arm dot com> 2011-08-09 15:55:46 UTC ---
Here is a small test case:

long long glob;
void bar(int val)
{
  glob = (val >= 0 && val <= 2147483647 ? val : 2147483647) * 1000000L; 
}

I reproduced the bug with the flags
arm-none-eabi-gcc -c  -O1 -mcpu=cortex-a8  -mthumb t1.c
but not with -O0  and not with -mcpu=cortex-a9.
By the way, changing the large numbers to smaller or removing conditions makes
the error message go away. 

The error seems to be generating K+1 instructions instead of K in the IT block.


bar:
    cmp    r0, #0
    itttt    ge
    movwge    r3, #16960
    movtge    r3, 15
    mulge    r0, r3, r0
    movge    r2, r0

    ite    ge
    asrge    r3, r2, #31
    adrlt    r3, .L4
    ldrdlt    r2, [r3]

    movw    r1, #:lower16:glob
    movt    r1, #:upper16:glob
    strd    r2, [r1]
    bx    lr


-- Greta


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