> > But I can also hide the cfun->function_frequency trick in > > DEFAULT_BRANCH_COST macro if it seems to help. (in longer term I hope > > they will all go away as expansion needs to be aware of hotness info > > anyway) > > Well, it definitly helps. I originally hoped there will be fewer places > querying BRANCH_COST without profile info. I am testing updated patch. > > Honza Grr > > ! if (GET_MODE_CLASS (mode) == MODE_INT && BRANCH_COST >= 2) > { > rtx extended = expand_shift (RSHIFT_EXPR, mode, op0, > size_int (GET_MODE_BITSIZE (mode) - 1), > --- 3425,3432 ---- > value of X as (((signed) x >> (W-1)) ^ x) - ((signed) x >> (W-1)), > where W is the width of MODE. */ > > ! if (GET_MODE_CLASS (mode) == MODE_INT > ! && DEFAULT_BRANCH_COST)
Should be: > ! if (GET_MODE_CLASS (mode) == MODE_INT > ! && DEFAULT_BRANCH_COST >= 2) Sorry for all the mess. I know I should re-read patches even after trivial mechanical changes :( I am re-testing with this fixed. Honza