This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 4/8] 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: Ilya Leoshkevich <iii at linux dot ibm dot com>
- Date: Tue, 20 Aug 2019 11:18:41 +0200
- Subject: [PATCH 4/8] S/390: Implement vcond expander for V1TI,V1TF
- References: <20190820091845.80750-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 0702e1de835..7d90d97b006 100644
--- a/gcc/config/s390/vector.md
+++ b/gcc/config/s390/vector.md
@@ -629,6 +629,21 @@
DONE;
})
+(define_expand "vcondv1tiv1tf"
+ [(set (match_operand:V1TI 0 "register_operand" "")
+ (if_then_else:V1TI
+ (match_operator 3 "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