Blame SOURCES/gcc8-rh1652929-4.patch

0e3697
commit 6f1a7440d9aac59fba0f2e2d8d0a9a0b82f480cb
0e3697
Author: acsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>
0e3697
Date:   Tue Oct 2 17:31:53 2018 +0000
0e3697
0e3697
    2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
0e3697
    
0e3697
            PR target/87474
0e3697
            * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
0e3697
            P8_VECTOR and VSX are enabled.
0e3697
    
0e3697
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264799 138bc75d-0d04-0410-961f-82ee72b054a4
0e3697
0e3697
diff --git a/gcc/config/rs6000/rs6000-string.c b/gcc/config/rs6000/rs6000-string.c
0e3697
index ff0414586d0..9c25bad97a1 100644
0e3697
--- a/gcc/config/rs6000/rs6000-string.c
0e3697
+++ b/gcc/config/rs6000/rs6000-string.c
0e3697
@@ -2205,6 +2205,7 @@ emit_final_str_compare_vec (rtx str1, rtx str2, rtx result,
0e3697
     }
0e3697
   else
0e3697
     {
0e3697
+      gcc_assert (TARGET_P8_VECTOR);
0e3697
       rtx diffix = gen_reg_rtx (DImode);
0e3697
       rtx result_gbbd = gen_reg_rtx (V16QImode);
0e3697
       /* Since each byte of the input is either 00 or FF, the bytes in 
0e3697
@@ -2313,9 +2314,12 @@ expand_strn_compare (rtx operands[], int no_length)
0e3697
   /* Is it OK to use vec/vsx for this. TARGET_VSX means we have at
0e3697
      least POWER7 but we use TARGET_EFFICIENT_UNALIGNED_VSX which is
0e3697
      at least POWER8.  That way we can rely on overlapping compares to
0e3697
-     do the final comparison of less than 16 bytes.  Also I do not want
0e3697
-     to deal with making this work for 32 bits.  */
0e3697
-  int use_vec = (bytes >= 16 && !TARGET_32BIT && TARGET_EFFICIENT_UNALIGNED_VSX);
0e3697
+     do the final comparison of less than 16 bytes.  Also I do not
0e3697
+     want to deal with making this work for 32 bits.  In addition, we
0e3697
+     have to make sure that we have at least P8_VECTOR (we don't allow
0e3697
+     P9_VECTOR without P8_VECTOR).  */
0e3697
+  int use_vec = (bytes >= 16 && !TARGET_32BIT
0e3697
+		 && TARGET_EFFICIENT_UNALIGNED_VSX && TARGET_P8_VECTOR);
0e3697
 
0e3697
   if (use_vec)
0e3697
     required_align = 16;