diff options
author | Richard Biener <rguenther@suse.de> | 2018-10-05 11:40:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-10-05 11:40:50 +0000 |
commit | 3f41c986d23a13c978c92ee253f6fd014ae8eca8 (patch) | |
tree | a26dc6b5497a03db95ae65db1eb8ea7cdc4fc2a4 /gcc | |
parent | ae36de91537f1568e0f50bd55b5b976b8289cdc1 (diff) | |
download | gcc-3f41c986d23a13c978c92ee253f6fd014ae8eca8.zip gcc-3f41c986d23a13c978c92ee253f6fd014ae8eca8.tar.gz gcc-3f41c986d23a13c978c92ee253f6fd014ae8eca8.tar.bz2 |
i386.c (ix86_add_stmt_cost): When scalar cost is asked for initialize mode to the component mode of the...
2018-10-05 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
is asked for initialize mode to the component mode of the
vector type.
From-SVN: r264866
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e9edd10..b8d4c9c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-10-05 Richard Biener <rguenther@suse.de> + + * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost + is asked for initialize mode to the component mode of the + vector type. + 2018-10-05 H.J. Lu <hongjiu.lu@intel.com> PR target/87522 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d35ad91..fafdcd4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -49486,17 +49486,21 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, { unsigned *cost = (unsigned *) data; unsigned retval = 0; + bool scalar_p + = (kind == scalar_stmt || kind == scalar_load || kind == scalar_store); tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE; int stmt_cost = - 1; bool fp = false; - machine_mode mode = TImode; + machine_mode mode = scalar_p ? SImode : TImode; if (vectype != NULL) { fp = FLOAT_TYPE_P (vectype); mode = TYPE_MODE (vectype); + if (scalar_p) + mode = TYPE_MODE (TREE_TYPE (vectype)); } if ((kind == vector_stmt || kind == scalar_stmt) |