public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/tnfchris/heads/gcc-14-early-break)] Don't enter piecewise expansion if VF is not constant.
@ 2023-06-28 13:32 Tamar Christina
  0 siblings, 0 replies; only message in thread
From: Tamar Christina @ 2023-06-28 13:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cac6efc11af28fd95dfb35520a3a4aa385fedf70

commit cac6efc11af28fd95dfb35520a3a4aa385fedf70
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Wed Jun 28 13:42:51 2023 +0100

    Don't enter piecewise expansion if VF is not constant.
    
    expand_vector_piecewise does not support VLA expansion as it has a hard assert
    on the type not being VLA.
    
    Instead of just failing to expand and so the call marked unsupported we ICE.
    This adjust it so we don't and can gracefully handle the expansion in support
    checks.
    
    gcc/ChangeLog:
    
            * tree-vect-generic.cc (expand_vector_comparison): Skip piecewise if not
            constant.

Diff:
---
 gcc/tree-vect-generic.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc
index df04a0db68d..da1fd2f40d8 100644
--- a/gcc/tree-vect-generic.cc
+++ b/gcc/tree-vect-generic.cc
@@ -481,7 +481,7 @@ expand_vector_comparison (gimple_stmt_iterator *gsi, tree type, tree op0,
 	    }
 	  t = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, type, t);
 	}
-      else
+      else if (TYPE_VECTOR_SUBPARTS (type).is_constant ())
 	t = expand_vector_piecewise (gsi, do_compare, type,
 				     TREE_TYPE (TREE_TYPE (op0)), op0, op1,
 				     code, false);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-28 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 13:32 [gcc(refs/users/tnfchris/heads/gcc-14-early-break)] Don't enter piecewise expansion if VF is not constant Tamar Christina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).