re PR target/68805 (ICE while var-tracking in simplify_binary_operation_1 with -g and -mvsx-timode)
[gcc] 2015-12-15 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/68805 * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use ROTATE instead of VEC_SELECT for TImode. * config/rs6000/vsx.md (VSX_LE): Move TImode from VSX_LE to VSX_LE_128, so that we use ROTATE to swap the 64-bit words instead of using VEC_SELECT. (VSX_LE_128): Likewise. (define_peephole2): Add peephole to eliminate double xxpermdi when copying TImode. [gcc/testsuite] 2015-12-15 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/68805 * gcc.target/powerpc/pr68805.c: New test. From-SVN: r231732
This commit is contained in:
parent
b880bd5dab
commit
9393bc31a2
5 changed files with 54 additions and 7 deletions
|
@ -1,3 +1,16 @@
|
|||
2015-12-15 Michael Meissner <meissner@linux.vnet.ibm.com>
|
||||
|
||||
PR target/68805
|
||||
* config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use ROTATE
|
||||
instead of VEC_SELECT for TImode.
|
||||
|
||||
* config/rs6000/vsx.md (VSX_LE): Move TImode from VSX_LE to
|
||||
VSX_LE_128, so that we use ROTATE to swap the 64-bit words instead
|
||||
of using VEC_SELECT.
|
||||
(VSX_LE_128): Likewise.
|
||||
(define_peephole2): Add peephole to eliminate double xxpermdi when
|
||||
copying TImode.
|
||||
|
||||
2015-12-16 John David Anglin <danglin@gcc.gnu.org>
|
||||
|
||||
PR target/68779
|
||||
|
|
|
@ -8829,8 +8829,9 @@ rs6000_const_vec (machine_mode mode)
|
|||
rtx
|
||||
rs6000_gen_le_vsx_permute (rtx source, machine_mode mode)
|
||||
{
|
||||
/* Use ROTATE instead of VEC_SELECT on IEEE 128-bit floating point. */
|
||||
if (FLOAT128_VECTOR_P (mode))
|
||||
/* Use ROTATE instead of VEC_SELECT on IEEE 128-bit floating point, and
|
||||
128-bit integers if they are allowed in VSX registers. */
|
||||
if (FLOAT128_VECTOR_P (mode) || mode == TImode)
|
||||
return gen_rtx_ROTATE (mode, source, GEN_INT (64));
|
||||
else
|
||||
{
|
||||
|
|
|
@ -26,15 +26,13 @@
|
|||
|
||||
;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
|
||||
;; lxvd2x to properly handle swapping words on little endian
|
||||
(define_mode_iterator VSX_LE [V2DF
|
||||
V2DI
|
||||
V1TI
|
||||
(TI "VECTOR_MEM_VSX_P (TImode)")])
|
||||
(define_mode_iterator VSX_LE [V2DF V2DI V1TI])
|
||||
|
||||
;; Mode iterator to handle swapping words on little endian for the 128-bit
|
||||
;; types that goes in a single vector register.
|
||||
(define_mode_iterator VSX_LE_128 [(KF "FLOAT128_VECTOR_P (KFmode)")
|
||||
(TF "FLOAT128_VECTOR_P (TFmode)")])
|
||||
(TF "FLOAT128_VECTOR_P (TFmode)")
|
||||
(TI "TARGET_VSX_TIMODE")])
|
||||
|
||||
;; Iterator for the 2 32-bit vector types
|
||||
(define_mode_iterator VSX_W [V4SF V4SI])
|
||||
|
@ -739,6 +737,21 @@
|
|||
: operands[0];
|
||||
})
|
||||
|
||||
;; Peephole to catch memory to memory transfers for TImode if TImode landed in
|
||||
;; VSX registers on a little endian system. The vector types and IEEE 128-bit
|
||||
;; floating point are handled by the more generic swap elimination pass.
|
||||
(define_peephole2
|
||||
[(set (match_operand:TI 0 "vsx_register_operand" "")
|
||||
(rotate:TI (match_operand:TI 1 "vsx_register_operand" "")
|
||||
(const_int 64)))
|
||||
(set (match_operand:TI 2 "vsx_register_operand" "")
|
||||
(rotate:TI (match_dup 0)
|
||||
(const_int 64)))]
|
||||
"!BYTES_BIG_ENDIAN && TARGET_VSX && TARGET_VSX_TIMODE
|
||||
&& (rtx_equal_p (operands[0], operands[2])
|
||||
|| peep2_reg_dead_p (2, operands[0]))"
|
||||
[(set (match_dup 2) (match_dup 1))])
|
||||
|
||||
;; The post-reload split requires that we re-permute the source
|
||||
;; register in case it is still live.
|
||||
(define_split
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-12-15 Michael Meissner <meissner@linux.vnet.ibm.com>
|
||||
|
||||
PR target/68805
|
||||
* gcc.target/powerpc/pr68805.c: New test.
|
||||
|
||||
2015-12-16 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR objc++/68932
|
||||
|
|
15
gcc/testsuite/gcc.target/powerpc/pr68805.c
Normal file
15
gcc/testsuite/gcc.target/powerpc/pr68805.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* { dg-do compile { target powerpc64le-*-* } } */
|
||||
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
|
||||
/* { dg-options "-O2 -mvsx-timode -mcpu=power8" } */
|
||||
|
||||
typedef struct bar {
|
||||
void *a;
|
||||
void *b;
|
||||
} TYPE;
|
||||
|
||||
void foo (TYPE *p, TYPE *q) { *p = *q; }
|
||||
|
||||
/* { dg-final { scan-assembler "lxvd2x" } } */
|
||||
/* { dg-final { scan-assembler "stxvd2x" } } */
|
||||
/* { dg-final { scan-assembler-not "xxpermdi" } } */
|
||||
|
Loading…
Add table
Reference in a new issue