Hi I spotted this while trawling through the arm code generator: the code in the NEG case has no effect. I assume the NEG case should return if the condition matches; patch attached. It's still present in trunk. case NEG: if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT) *total = COSTS_N_INSNS (1); /* Fall through */ case NOT: *total = COSTS_N_INSNS (ARM_NUM_REGS (mode)); return false;
Created attachment 16418 [details] Aplies the "obvious" fix
Don't know if the patch is OK, but the code is obviously doing something silly. CC-ing ARM maintainer.
Subject: Bug 37668 Author: rearnsha Date: Wed Dec 10 14:57:18 2008 New Revision: 142647 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142647 Log: Martin Guy <martinwguy@yahoo.it> PR target/37668 * arm.c (arm_size_rtx_costs, case NEG): Don't fall through if the result will be in an FPU register. Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c
Fixed in 4.4.0