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] | |
One of the local programmers tried to use the __builtin_unpack_vector_int128 function, but his second argument was not the constant 0 or 1. The compiler put the 2nd argument into a register, but there wasn't a valid insn for this, and raised an insn not found message. GCC should warn about this illegal usage. This patch adds such a warning. While I was mucking about with this built-in function, I fixed the constraints to allow the 64-bit integer for unpack result and pack inputs to be in the traditional Altivec registers as well as the traditional floating point registers. I did a bootstrap of the compiler, and there were no regressions on a little endian power8 system. I verified that the new test is run. Can I apply this patch to the trunk? Can I apply the part of the patch from rs6000.c to the existing GCC 6/7 branches as well after a shake down period? The patch to rs6000.md is not appropriate for GCC 6 (since DImode can't go into Altivec registers). For GCC 7, it would need to be modified to use the 'wi' constraint instead of 'wa', since GCC 7 still had support for the -mno-upper-regs-di option to control access to the traditional Altivec register. [gcc] 2017-08-28 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/82015 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure that the second argument of the built-in functions to unpack 128-bit scalar types to 64-bit values is 0 or 1. Change to use a switch statement instead a lot of if statements. * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator): Allow 64-bit values to be in Altivec registers as well as traditional floating point registers. (pack<mode>, FMOVE128_VSX iterator): Likewise. [gcc/testsuite] 2017-08-28 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/82015 * gcc.target/powerpc/pr82015.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:
pr82015.patch01b
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |