This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH v2 5/9] S/390: Implement vcond expander for V1TI,V1TF
- From: Ilya Leoshkevich <iii at linux dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: richard dot sandiford at arm dot com, segher at kernel dot crashing dot org, Ilya Leoshkevich <iii at linux dot ibm dot com>
- Date: Thu, 22 Aug 2019 15:45:47 +0200
- Subject: [PATCH v2 5/9] S/390: Implement vcond expander for V1TI,V1TF
- References: <20190822134551.18924-1-iii@linux.ibm.com>
Currently gcc does not emit wf{c,k}* instructions when comparing long
double values. Middle-end actually adds them in the first place, but
then veclower pass replaces them with floating point register pair
operations, because the corresponding expander is missing.
gcc/ChangeLog:
2019-08-09 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/vector.md (vcondv1tiv1tf): New variant of
vcond$a$b expander.
---
gcc/config/s390/vector.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md
index d7a266c5605..ca5ec0dd3b0 100644
--- a/gcc/config/s390/vector.md
+++ b/gcc/config/s390/vector.md
@@ -649,6 +649,21 @@
DONE;
})
+(define_expand "vcondv1tiv1tf"
+ [(set (match_operand:V1TI 0 "register_operand" "")
+ (if_then_else:V1TI
+ (match_operator 3 "vcond_comparison_operator"
+ [(match_operand:V1TF 4 "register_operand" "")
+ (match_operand:V1TF 5 "nonmemory_operand" "")])
+ (match_operand:V1TI 1 "nonmemory_operand" "")
+ (match_operand:V1TI 2 "nonmemory_operand" "")))]
+ "TARGET_VXE"
+{
+ s390_expand_vcond (operands[0], operands[1], operands[2],
+ GET_CODE (operands[3]), operands[4], operands[5]);
+ DONE;
+})
+
(define_expand "vcondu<V_HW:mode><V_HW2:mode>"
[(set (match_operand:V_HW 0 "register_operand" "")
(if_then_else:V_HW
--
2.21.0