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