On Sun, Jan 31, 2016 at 5:28 PM, Alan Modra <amo...@gmail.com> wrote: > lqarx RT and stqcx. RS are valid only with even numbered gprs. The > predicate to enforce this happens to allow a loophole, closed by this > patch. > > This pattern created by combine: > Trying 8 -> 9: > Successfully matched this instruction: > (set (subreg:PTI (reg:TI 155 [ D.2357 ]) 0) > (unspec_volatile:PTI [ > (mem/v:TI (reg/v/f:DI 157 [ mptr ]) [-1 S16 A128]) > ] UNSPECV_LL)) > > is seen by reload as needing to reload pseudo 155 in TI mode, which > has no requirement that the reg be even. Apparently, nothing checks > the predicate again after reload. > > We only see this problem on gcc-5 and gcc-4.9, because on gcc-6 we > don't define WORD_REGISTER_OPERATIONS and combine happens to have a > bug in simplify_set that prevents it creating the problem subregs. > See https://gcc.gnu.org/ml/gcc-patches/2016-01/msg02377.html > > Bootstrapped and regression tested powerpc64-linux biarch on master > both with and without the combine bug, and on gcc-5. OK for master > and active branches? > > gcc/ > PR target/69548 > * config/rs6000/predicates.md (quad_int_reg_operand): Don't > allow subregs. > gcc/testsuite/ > * gcc.target/powerpc/pr69548.c: New test.
Okay. Thanks, David