Created attachment 39088 [details] preprocessed version of 20021120-1.c Compiling the test case with options: -mcpu=power9 -fno-diagnostics-show-caret -fdiagnostics-color=never -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -w -lm -o ./20021120-1.exe Results in /tmp/cc9aoc1f.s: Assembler messages: /tmp/cc9aoc1f.s:552: Error: operand out of domain (30 is not a multiple of 4) /tmp/cc9aoc1f.s:552: Error: syntax error; found `,', expected `(' /tmp/cc9aoc1f.s:552: Error: junk at end of line: `,24' The compiler is gcc-6-branch svn version 239277.
I believe this is a duplicate of PR 72802 that Alan fixed on August 8th for trunk (subversion id 239233), and backported to the gcc-6-branch (subversion id 239269)
Created attachment 39090 [details] Proposed patch to fix the problem Alan mixed up the stxsspx and stxssp alternatives. I haven't yet done the bootstrap and make check on this patch.
Confirmed and this is a regression from 6.1.
Created attachment 39092 [details] Proposed patch to fix the problem #2 I was looking at the wrong line of assembly in the previous patch. This patches adds a check for the address being offsettable. In the movdf patterns, the ISA 3.0 d-form (reg+offset) address alternatives (stxsd, lxsd) come before the ISA 2.06 x-form (reg+reg) alternatives (stxsdx, lxsdx). So if an indexed address using the Altivec regsiters is emitted when -mcpu=power9 is used, the compiler will emit an illegal instruction.
Yeah, Alan did mess up here in removing offsettable_address_p from the wY constraint. It wasn't entirely accidental either. I'd intended to add a simpler test in mem_operand_ds_form to replace it. Mike, shouldn't the test in your fix be if (!offsettable_address_p (false, mode, addr)) ie. *not* strict? See tm-constrs.h "o" constraint test: static inline bool satisfies_constraint_o (rtx op) { return (GET_CODE (op) == MEM) && ( #line 32 "/home/alan/src/gcc.git/gcc/common.md" (offsettable_nonstrict_memref_p (op))); }
Author: meissner Date: Wed Aug 10 13:49:12 2016 New Revision: 239325 URL: https://gcc.gnu.org/viewcvs?rev=239325&root=gcc&view=rev Log: [gcc] 2016-08-10 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/72853 * config/rs6000/rs6000.c (mem_operand_ds_form): Add check for op being an offsettable address. [gcc/testsuite] 2016-08-10 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/72853 * gcc.target/powerpc/pr72853.c: New test. Added: trunk/gcc/testsuite/gcc.target/powerpc/pr72853.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/testsuite/ChangeLog
Author: meissner Date: Wed Aug 10 18:15:37 2016 New Revision: 239331 URL: https://gcc.gnu.org/viewcvs?rev=239331&root=gcc&view=rev Log: Backport from mainline: [gcc] 2016-08-10 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/72853 * config/rs6000/rs6000.c (mem_operand_ds_form): Add check for op being an offsettable address. [gcc/testsuite] 2016-08-10 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/72853 * gcc.target/powerpc/pr72853.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/pr72853.c - copied unchanged from r239330, trunk/gcc/testsuite/gcc.target/powerpc/pr72853.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
Fixed in trunk (subversion id 239325) and gcc-6-branch (subversion id 239331).