Simplify vect_is_simple_use

Message ID 6370301r-n7n4-ron0-78ro-405o4114s31q@fhfr.qr
State New
Headers show
Series
  • Simplify vect_is_simple_use
Related show

Commit Message

Richard Biener June 9, 2021, 11:08 a.m.
This simplifies vect_is_simple_use to always get the def-type from
the stmt_info instead of singleing out some gimple stmt kinds.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

2021-06-09  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vect_is_simple_use): Always get dt
	from the stmt.
---
 gcc/tree-vect-stmts.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

-- 
2.26.2

Patch

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index bd2a1c89e67..eeef96a2eb6 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -11326,17 +11326,7 @@  vect_is_simple_use (tree operand, vec_info *vinfo, enum vect_def_type *dt,
 	{
 	  stmt_vinfo = vect_stmt_to_vectorize (stmt_vinfo);
 	  def_stmt = stmt_vinfo->stmt;
-	  switch (gimple_code (def_stmt))
-	    {
-	    case GIMPLE_PHI:
-	    case GIMPLE_ASSIGN:
-	    case GIMPLE_CALL:
-	      *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo);
-	      break;
-	    default:
-	      *dt = vect_unknown_def_type;
-	      break;
-	    }
+	  *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo);
 	  if (def_stmt_info_out)
 	    *def_stmt_info_out = stmt_vinfo;
 	}