aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2020-11-12 08:20:43 +0100
committerAndreas Krebbel <krebbel@linux.ibm.com>2020-11-12 08:36:37 +0100
commit5d9ade39b8720b61cf63a8be181fb3b487f6ac5b (patch)
treec6f488d83fd30d151183fb6e8d005f8697502a6f
parent7ea19dcafb8d373732158eb48adbf7bfc8d8ba27 (diff)
downloadgcc-5d9ade39b8720b61cf63a8be181fb3b487f6ac5b.zip
gcc-5d9ade39b8720b61cf63a8be181fb3b487f6ac5b.tar.gz
gcc-5d9ade39b8720b61cf63a8be181fb3b487f6ac5b.tar.bz2
IBM Z: Fix PR97326: Enable fp compares in vec_cmp
gcc/ChangeLog: PR target/97326 * config/s390/vector.md: Support vector floating point modes in vec_cmp.
-rw-r--r--gcc/config/s390/vector.md22
1 files changed, 16 insertions, 6 deletions
diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md
index 58b8999..fef6864 100644
--- a/gcc/config/s390/vector.md
+++ b/gcc/config/s390/vector.md
@@ -145,6 +145,16 @@
(V1SF "V1SI") (V2SF "V2SI") (V4SF "V4SI")
(V1DF "V1DI") (V2DF "V2DI")
(V1TF "V1TI") (TF "V1TI")])
+
+(define_mode_attr tointvec [(V1QI "v1qi") (V2QI "v2qi") (V4QI "v4qi") (V8QI "v8qi") (V16QI "v16qi")
+ (V1HI "v1hi") (V2HI "v2hi") (V4HI "v4hi") (V8HI "v8hi")
+ (V1SI "v1si") (V2SI "v2si") (V4SI "v4si")
+ (V1DI "v1di") (V2DI "v2di")
+ (V1TI "v1ti")
+ (V1SF "v1si") (V2SF "v2si") (V4SF "v4si")
+ (V1DF "v1di") (V2DF "v2di")
+ (V1TF "v1ti") (TF "v1ti")])
+
(define_mode_attr vw [(SF "w") (V1SF "w") (V2SF "v") (V4SF "v")
(DF "w") (V1DF "w") (V2DF "v")
(TF "w") (V1TF "w")])
@@ -1546,14 +1556,14 @@
})
;;
-;; Integer compares
+;; Compares
;;
-(define_expand "vec_cmp<VI_HW:mode><VI_HW:mode>"
- [(set (match_operand:VI_HW 0 "register_operand" "")
- (match_operator:VI_HW 1 ""
- [(match_operand:VI_HW 2 "register_operand" "")
- (match_operand:VI_HW 3 "register_operand" "")]))]
+(define_expand "vec_cmp<mode><tointvec>"
+ [(set (match_operand:<TOINTVEC> 0 "register_operand" "")
+ (match_operator:<TOINTVEC> 1 ""
+ [(match_operand:V_HW 2 "register_operand" "")
+ (match_operand:V_HW 3 "register_operand" "")]))]
"TARGET_VX"
{
s390_expand_vec_compare (operands[0], GET_CODE(operands[1]), operands[2], operands[3]);