This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, While looking at why we have so many moves between VFP and core registers, I came across a situation in LU.c from scimark where we load values into core registers transfer them to the VFP registers and then use them in a VFP multiply instructions. Given that we should prefer FPmode values in FP registers when TARGET_VFP is true, the constraint orders ought to be rejigged to allow this. The diff below shows the difference in code generated for that function after and before the patch. Looking at *movdf_vfp I can only guess that the original intention of these patterns were to have the VFP registers ahead because the type attribute is set to f_loadd and f_stored for the alternatives but the constraints and everything else was not in sync with this. > str sl, [sp, #12] ... fldd d19, [sl, #0] | ldrd sl, [sl] fmuld d17, d19, d16 | fmdrr d18, sl, fp > ldr sl, [sp, #12] > fmuld d17, d18, d16 This is now being tested on v7-a / qemu with arm/thumb multilibs for arm-linux-gnueabi. Ok to commit ? cheers Ramana 2011-07-26 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> * config/arm/vfp.md ("*movdf_vfp"): Handle the VFP constraints before the core constraints. Adjust attributes. (*thumb2_movdf_vfp"): Likewise.
Attachment:
vfp-reg-constraints-patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |