From ef2df51671bb6c755302ffe8e36eae0755882ad2 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 6 Jul 2019 08:26:44 +0000 Subject: [PATCH] [s390] Fix ambiguous .md attribute uses This patch is part of a series that fixes ambiguous attribute uses in .md files, i.e. cases in which attributes didn't use to specify an iterator, and in which could have different values depending on the iterator chosen. The vx-builtins.md part changes the choice of from the implicit to an explicit (i.e. from the mode of the comparison result to the mode of the operands being compared). That seemed like the intended behaviour given later patterns like vec_cmpeq_cc. The use of BFP in the s390.md LNDFR pattern looks like a typo, since the operand to (abs ...) has to have the same mode as the result. The only effect before this series was to create some extra variants that would never match, making it harmless apart from very minor code bloat. 2019-07-06 Richard Sandiford gcc/ * config/s390/s390.md (*negabs2_nocc): Use FP for operand 1. * config/s390/vx-builtins.md (*vec_cmp_cconly): Make the choice of explicit, giving... (*vec_cmp_cconly): ...this. From-SVN: r273162 --- gcc/ChangeLog | 8 ++++++++ gcc/config/s390/s390.md | 4 ++-- gcc/config/s390/vx-builtins.md | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b318b9f7c9..3694a7716f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-07-06 Richard Sandiford + + * config/s390/s390.md (*negabs2_nocc): Use FP for + operand 1. + * config/s390/vx-builtins.md (*vec_cmp_cconly): + Make the choice of explicit, giving... + (*vec_cmp_cconly): ...this. + 2019-07-06 Richard Sandiford * config/i386/i386.md (*fop__3_i387) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index d06aea93128..79451d7aef3 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -8821,8 +8821,8 @@ ; lndfr (define_insn "*negabs2_nocc" - [(set (match_operand:FP 0 "register_operand" "=f") - (neg:FP (abs:FP (match_operand:BFP 1 "register_operand" ""))))] + [(set (match_operand:FP 0 "register_operand" "=f") + (neg:FP (abs:FP (match_operand:FP 1 "register_operand" ""))))] "TARGET_DFP" "lndfr\t%0,%1" [(set_attr "op_type" "RRE") diff --git a/gcc/config/s390/vx-builtins.md b/gcc/config/s390/vx-builtins.md index 3020bc94d3e..c71aae032ee 100644 --- a/gcc/config/s390/vx-builtins.md +++ b/gcc/config/s390/vx-builtins.md @@ -2046,7 +2046,7 @@ ;; ; vfcesbs, vfcedbs, wfcexbs, vfchsbs, vfchdbs, wfchxbs, vfchesbs, vfchedbs, wfchexbs -(define_insn "*vec_cmp_cconly" +(define_insn "*vec_cmp_cconly" [(set (reg:VFCMP CC_REGNUM) (compare:VFCMP (match_operand:VF_HW 0 "register_operand" "v") (match_operand:VF_HW 1 "register_operand" "v"))) -- 2.30.2