Blame SOURCES/gcc48-pr92950.patch

57942a
2019-12-17  Andreas Krebbel  <krebbel@linux.ibm.com>
57942a
57942a
	Backport from mainline
57942a
	2019-12-16  Andreas Krebbel  <krebbel@linux.ibm.com>
57942a
57942a
	PR target/92950
57942a
	* config/s390/vector.md ("mov<mode>" for V_8): Replace lh, lhy,
57942a
	and lhrl with llc.
57942a
57942a
--- gcc/config/s390/vector.md
57942a
+++ gcc/config/s390/vector.md
57942a
@@ -289,9 +289,9 @@
57942a
 ; However, this would probably be slower.
57942a
 
57942a
 (define_insn "mov<mode>"
57942a
-  [(set (match_operand:V_8 0 "nonimmediate_operand" "=v,v,d, v,QR,  v,  v,  v,  v,d,  Q,  S,  Q,  S,  d,  d,d,d,d,R,T")
57942a
-        (match_operand:V_8 1 "general_operand"      " v,d,v,QR, v,j00,jm1,jyy,jxx,d,j00,j00,jm1,jm1,j00,jm1,R,T,b,d,d"))]
57942a
-  ""
57942a
+  [(set (match_operand:V_8 0 "nonimmediate_operand" "=v,v,d,v,QR,  v,  v,  v,  v,d,  Q,  S,  Q,  S,  d,  d,d,R,T")
57942a
+        (match_operand:V_8 1 "general_operand"      " v,d,v,QR,v,j00,jm1,jyy,jxx,d,j00,j00,jm1,jm1,j00,jm1,T,d,d"))]
57942a
+  "TARGET_VX"
57942a
   "@
57942a
    vlr\t%v0,%v1
57942a
    vlvgb\t%v0,%1,0
57942a
@@ -309,12 +309,10 @@
57942a
    mviy\t%0,-1
57942a
    lhi\t%0,0
57942a
    lhi\t%0,-1
57942a
-   lh\t%0,%1
57942a
-   lhy\t%0,%1
57942a
-   lhrl\t%0,%1
57942a
+   llc\t%0,%1
57942a
    stc\t%1,%0
57942a
    stcy\t%1,%0"
57942a
-  [(set_attr "op_type"      "VRR,VRS,VRS,VRX,VRX,VRI,VRI,VRI,VRI,RR,SI,SIY,SI,SIY,RI,RI,RX,RXY,RIL,RX,RXY")])
57942a
+  [(set_attr "op_type"      "VRR,VRS,VRS,VRX,VRX,VRI,VRI,VRI,VRI,RR,SI,SIY,SI,SIY,RI,RI,RXY,RX,RXY")])
57942a
 
57942a
 (define_insn "mov<mode>"
57942a
   [(set (match_operand:V_16 0 "nonimmediate_operand" "=v,v,d, v,QR,  v,  v,  v,  v,d,  Q,  Q,  d,  d,d,d,d,R,T,b")
57942a
--- /dev/null
57942a
+++ gcc/testsuite/gcc.target/s390/vector/pr92950.c
57942a
@@ -0,0 +1,25 @@
57942a
+/* { dg-do run } */
57942a
+/* { dg-options "-O3 -mzarch -march=z13" } */
57942a
+
57942a
+struct a {
57942a
+  int b;
57942a
+  char c;
57942a
+};
57942a
+struct a d = {1, 16};
57942a
+struct a *e = &d;
57942a
+
57942a
+int f = 0;
57942a
+
57942a
+int main() {
57942a
+  struct a g = {0, 0 };
57942a
+  f = 0;
57942a
+
57942a
+  for (; f <= 1; f++) {
57942a
+    g = d;
57942a
+    *e = g;
57942a
+  }
57942a
+
57942a
+  if (d.c != 16)
57942a
+    __builtin_abort();
57942a
+  return 0;
57942a
+}