/* -O1 -mthumb -march=armv6t2 -ffinite-math-only */ float repl1 (float varx) { if (varx < 0.0) return 0.0; return varx; }
This fails for me with r149508 with a reload failure.
(In reply to comment #1) > This fails for me with r149508 with a reload failure. > I don't seem to have a reload failure for this with 150624.
There isn't a reload failure with trunk as of yesterday. Paolo can you explain this further ?
I don't see the reload failure anymore. The code is: push {r4, lr} mov r4, r0 mov r1, #0 bl __gesf2 cmp r0, #0 it lt movlt r4, #0 mov r0, r4 pop {r4, pc} Pre-cond-optab, we generated push {r4, lr} mov r4, r0 mov r1, #0 bl __gesf2 cmp r0, #0 mov r0, #0 <<<< it ge movge r0, r4 pop {r4, pc} So this is fixed. I'm leaving this bug open as an enhancement though because the highlighted mov is redundant.
Trunk today (r156595) produces this: repl1: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} mov r4, r0 mov r1, #0 bl __gesf2 cmp r0, #0 it lt movlt r4, #0 mov r0, r4 pop {r4, pc} Regarding the redundant mov of comment #4: There is another PR about missed implicit sets after reload, see bug 14770. I'm sure this is the same issue. Thus, fixed.