Hi Richard, On 24/01/16 10:54, Richard Henderson wrote:
This looks to be an incomplete transition of the aarch64 backend to CONST_WIDE_INT. I haven't checked to see if it's a regression from gcc5, but I suspect not, since there should have been similar checks for CONST_DOUBLE.
FWIW, I defined TARGET_SUPPORTS_WIDE_INT for aarch64 on trunk and the GCC 5 branch in order to fix PR 68129.
This is probably gcc7 fodder, but it helped me debug another TImode PR. r~
+ case CONST_WIDE_INT: + *cost = 0; + for (unsigned int n = CONST_WIDE_INT_NUNITS(x), i = 0; i < n; ++i) + { + unsigned HOST_WIDE_INT e = CONST_WIDE_INT_ELT(x, i); + if (e != 0) + *cost += COSTS_N_INSNS (aarch64_internal_mov_immediate + (NULL_RTX, GEN_INT (e), false, DImode)); + } + return true; + We usually avoid creating intermediate rtxes in the cost function because it can potentially be called many times during compilation and we want to avoid creating too many short-lived objects, though I suppose there's no way getting around this one (the GEN_INT call). Thanks, Kyrill