On Tue, Feb 14, 2012 at 07:27:21AM +0000, Paulo J. Matos wrote: > case RTX_OBJ: > /* Complex expressions should be the first, so decrease priority > of objects. Prefer pointer objects over non pointer objects. */ > - if ((REG_P (op) && REG_POINTER (op)) > - || (MEM_P (op) && MEM_POINTER (op))) > - return -1; > - return -2; > + if(REG_P(op)) > + return -1; > + else if ((REG_P (op) && REG_POINTER (op)) > + || (MEM_P (op) && MEM_POINTER (op))) > + return -2; > + return -3;
The above is definitely wrong, I think it will penalize e.g. Power6/7 a lot. Note that the REG_P && REG_POINTER testis then useless because of your change. So, if anything, you'd need to use highest priority for REG_P && REG_POINTER, then MEM_P && MEM_POINTER, then REG_P and then MEM_P and verify it doesn't regress on any major target on SPEC etc. Watch your formatting and I don't think this is stage4 material in any case, it is extremely risky change. Jakub