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] | |
PR 67211 is an error that shows up on the GCC 5.x branch when the test case is compiled with -mcpu=power7 -mtune=power8 -O3. In looking at the code, I noticed that the code optimized adjancent 64-bit integer/pointers in a structure from DImode to V2DImode. The compiler optimized these to the vector registers, and then tried to move a common field used later back to the GPR field. If the cpu was power8, it would be able to use the direct move instructions, but on power7 those instructions don't exist. The current trunk compiler has dialed back on the optimization, and it no longer tries to optimize adjacent fields in this particular case to V2DImode, but it is an issue in the GCC 5 branch. In debugging the issue, I noticed the -mefficient-unaligned-VSX option was being set if -mtune=power8 was used, even if the architecture was not a power8. Efficient unaligned VSX is an architecture feature, and not a tuning feature. In fixing this to be an architecture feature, it no longer tried to do the V2DImode optimization because it didn't have fast unaligned support. I have checked this on a big endian power7 and a little endian power8 system, using the GCC 5.x patches and the patches for the trunk. There were no regressions in any of the runs. Is it ok to install these patches on both the GCC 5.x branch and trunk? I would like to commit a similar patch for the 4.9 branch as well. Is this ok? Note, due to rs6000.opt being slightly different between GCC 5.x and trunk, there are two different patches, one for GCC 5.x and the other for GCC 6.x (trunk). [gcc] 2015-08-20 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/67211 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Set -mefficient-unaligned-vsx on ISA 2.7. * config/rs6000/rs6000.opt (-mefficient-unaligned-vsx): Convert option to a masked option. * config/rs6000/rs6000.c (rs6000_option_override_internal): Rework logic for -mefficient-unaligned-vsx so that it is set via an arch ISA option, instead of being set if -mtune=power8 is set. Move -mefficient-unaligned-vsx and -mallow-movmisalign handling to be near other default option handling. [gcc/testsuite] 2015-08-20 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/67211 * g++.dg/pr67211.C: New test. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
Attachment:
pr67211.patch04-gcc5
Description: Text document
Attachment:
pr67211.patch04-gcc6
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |