On Mon, Nov 19, 2012 at 8:55 AM, Uros Bizjak wrote: >> The following patch fixes >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19398 >> >> Uros, there is i386.md part for which I need an approval. Without this >> change, GCC will still generate the same code even if LRA uses an >> alternative with 'm' constraint. >> >> 2012-11-18 Vladimir Makarov >> >> PR target/19398 >> * lra-constraints.c (process_alt_operands): Discourage reloads >> through secodnary memory. >> * config/i386/i386.md (fix_trunc?f?i_sse): Remove peephole2 >> patterns. > > Thanks! > > Please note that i386.md change is not correct, it is peephole2 with > "Shorten x87->SSE reload sequences ..." comment that is not effective > anymore with your patch and should now be removed. The peephole2s that > your patch removes undo LRA transformation for targets that *do not* > benefit from MEM->REG operation for this particular FIX RTX. (Also, > please note that your patch includes movti_internal_rex64 change that > was already reverted due to better fix). > > Please remove mentioned peephole2 instead. The test from the PR will > show effects of LRA change for all targets, other than core2i7_64, k8 > and generic 64bit targets. > > The patch that removes mentioned peephole2 from i386.md is pre-approved. I have merged my x86 target patch that removes correct peephole2 and associated defines with Vlad's patch and committed everything (including testcase) to mainline SVN. Also, the patch includes macroization of a couple of RTXes in this area. 2012-11-20 Uros Bizjak * config/i386/i386.md (fix_trunc_sse): Macroize insn from fix_trunc{si,di}_sse using SWI48 mode iterator. (peephole2 to avoid vector decoded forms): Macroize peephole2 using MODEF mode iterator. Use SWI48 mode iterator instead of SWI48x. 2012-11-20 Uros Bizjak PR target/19398 * config/i386/i386.md (peephole2 to shorten x87->SSE reload sequences): Remove peephole2. * config/i386/i386.h (enum ix86_tune_indices) : Remove. (TARGET_SHORTEN_X87_SSE): Remove. * config/i386/i386.c (initial_ix86_tune_features): Update. 2012-11-20 Vladimir Makarov PR target/19398 * lra-constraints.c (process_alt_operands): Discourage reloads through secodnary memory. testsuite/ChangeLog: 2012-11-20 Uros Bizjak PR target/19398 * gcc.target/i386/pr19398.c: New test. Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN. Uros.