Fix confusion about load_p in vect_build_slp_tree_1
commitd96659e34cdcf43640541e1b7401ac546e0d1bf5
authorRichard Biener <rguenther@suse.de>
Thu, 24 Aug 2023 11:46:12 +0000 (24 13:46 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 24 Aug 2023 12:42:19 +0000 (24 14:42 +0200)
tree60db9a0e64c8d85b09fa8aa7e3b6866567737b65
parent3d2e240af7704b7c4fc15fb3c8b282556841108d
Fix confusion about load_p in vect_build_slp_tree_1

load_p is set and used as to whether the stmt is a memory operation,
not whether it is only a load.  The following renames it to ldst_p
to avoid this confusion.  It also replaces checking for a VUSE
with checking STMT_VINFO_DATA_REF since VUSE checking doesn't
work for pattern matched stores where no virtual operands are
present.  Where we want to distinguish between loads and stores
we then check DR_IS_READ/WRITE.

I've made a classification mistake with .MASK_STORE support and
this hits other complications when dealing with single-lane SLP.

* tree-vect-slp.cc (vect_build_slp_tree_1): Rename
load_p to ldst_p, fix mistakes and rely on
STMT_VINFO_DATA_REF.
gcc/tree-vect-slp.cc