From: iii Date: Thu, 10 Oct 2019 17:00:29 +0000 (+0000) Subject: [PATCH 1/3] S/390: Do not use signaling vector comparisons on z13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5c1ee57b5f2423f62cafeefb9445c952172fa68;p=thirdparty%2Fgcc.git [PATCH 1/3] S/390: Do not use signaling vector comparisons on z13 z13 supports only non-signaling vector comparisons. This means we cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13. Notify middle-end about this by using more restrictive operator predicate in vcond. gcc/ChangeLog: 2019-10-10 Ilya Leoshkevich PR target/77918 * config/s390/vector.md (vcond_comparison_operator): New predicate. (vcond): Use vcond_comparison_operator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276842 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e3c1a4f0717c..9c34213997f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-10 Ilya Leoshkevich + + PR target/77918 + * config/s390/vector.md (vcond_comparison_operator): New + predicate. + (vcond): Use vcond_comparison_operator. + 2019-10-10 David Malcolm PR 87488 diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md index 127b75f63f1d..e50047b96e4c 100644 --- a/gcc/config/s390/vector.md +++ b/gcc/config/s390/vector.md @@ -614,10 +614,30 @@ operands[2] = GEN_INT (GET_MODE_NUNITS (mode) - 1); }) +(define_predicate "vcond_comparison_operator" + (match_operand 0 "comparison_operator") +{ + if (!HONOR_NANS (GET_MODE (XEXP (op, 0))) + && !HONOR_NANS (GET_MODE (XEXP (op, 1)))) + return true; + switch (GET_CODE (op)) + { + case LE: + case LT: + case GE: + case GT: + case LTGT: + /* Signaling vector comparisons are supported only on z14+. */ + return TARGET_Z14; + default: + return true; + } +}) + (define_expand "vcond" [(set (match_operand:V_HW 0 "register_operand" "") (if_then_else:V_HW - (match_operator 3 "comparison_operator" + (match_operator 3 "vcond_comparison_operator" [(match_operand:V_HW2 4 "register_operand" "") (match_operand:V_HW2 5 "nonmemory_operand" "")]) (match_operand:V_HW 1 "nonmemory_operand" "")