public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alex Coplan <alex.coplan@arm.com>
To: Richard Biener <rguenther@suse.de>
Cc: Vaseeharan Vinayagamoorthy <Vaseeharan.Vinayagamoorthy@arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] tree-optimization/107672 - avoid vector mode type_for_mode call
Date: Mon, 28 Nov 2022 16:06:08 +0000	[thread overview]
Message-ID: <Y4TccFjcDHcIp95N@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2211252107530.3568@rguenther-XPS-13-9380>

Hi Richard,

On 25/11/2022 21:08, Richard Biener via Gcc-patches wrote:
> 
> 
> On Fri, 25 Nov 2022, Vaseeharan Vinayagamoorthy wrote:
> 
> > Hi,
> > 
> > I am seeing an internal compiler error, related to this patch:
> 
> Can you please open a bugzilla for this and attach preprocessed
> source so I can reproduce the ICE with a cc1 cross compiler?

I've raised a PR for this with a reduced testcase here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107896

Thanks,
Alex

> 
> Thanks,
> Richard.
> 
> > 
> > during GIMPLE pass: slp
> > 
> > options-save.cc: In function 'void cl_optimization_restore(gcc_options*,
> > gcc_options*, cl_optimization*)':
> > 
> > options-save.cc:1292:1: internal compiler error: in
> > supportable_widening_operation, at tree-vect-stmts.cc:12199
> > 
> > �
> > 
> > �1292 | cl_optimization_restore (struct gcc_options *opts, struct
> > gcc_options *opts_set,
> > 
> > �| ^~~~~~~~~~~~~~~~~~~~~~~
> > 
> > /�/src/gcc/gcc/profile-count.cc: In member function 'int
> > profile_count::to_cgraph_frequency(profile_count) const':
> > 
> > /�/src/gcc/gcc/profile-count.cc:308:1: note: parameter passing for argument
> > of type 'profile_count' changed in GCC 9.1
> > 
> > �308 | profile_count::to_cgraph_frequency (profile_count entry_bb_count)
> > const
> > 
> > �| ^~~~~~~~~~~~~
> > 
> > /�/src/gcc/gcc/profile-count.cc: In member function 'sreal
> > profile_count::to_sreal_scale(profile_count, bool*) const':
> > 
> > /�/src/gcc/gcc/profile-count.cc:326:1: note: parameter passing for argument
> > of type 'profile_count' changed in GCC 9.1
> > 
> > �326 | profile_count::to_sreal_scale (profile_count in, bool *known) const
> > 
> > �| ^~~~~~~~~~~~~
> > 
> > 0x2195bdd supportable_widening_operation(vec_info*, tree_code,
> > _stmt_vec_info*, tree_node*, tree_node*, tree_code*, tree_code*, int*,
> > vec<tree_node*, va_heap, vl_ptr>*)
> > 
> > �/�/src/gcc/gcc/tree-vect-stmts.cc:12199
> > 
> > 0x2180493 vectorizable_conversion
> > 
> > �/�/src/gcc/gcc/tree-vect-stmts.cc:5064
> > 
> > 0x2192fdd vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
> > _slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
> > 
> > �/�/src/gcc/gcc/tree-vect-stmts.cc:11256
> > 
> > �
> > 
> > /�/src/gcc/gcc/profile-count.cc: In member function 'profile_count
> > profile_count::combine_with_ipa_count(profile_count)':
> > 
> > /�/src/gcc/gcc/profile-count.cc:398:1: note: parameter passing for argument
> > of type 'profile_count' changed in GCC 9.1
> > 
> > �398 | profile_count::combine_with_ipa_count (profile_count ipa)
> > 
> > �| ^~~~~~~~~~~~~
> > 
> > 0x14f95d1 vect_slp_analyze_node_operations_1
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:5958
> > 
> > 0x14f9c19 vect_slp_analyze_node_operations
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:6147
> > 
> > 0x14f9b4d vect_slp_analyze_node_operations
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:6126
> > 
> > 0x14fa439 vect_slp_analyze_operations(vec_info*)
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:6387
> > 
> > 0x14fd423 vect_slp_analyze_bb_1
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:7372
> > 
> > 0x14fd599 vect_slp_region
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:7419
> > 
> > 0x14fe0d1 vect_slp_bbs
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:7610
> > 
> > 0x14fe46f vect_slp_function(function*)
> > 
> > �/�/src/gcc/gcc/tree-vect-slp.cc:7698
> > 
> > 0x151a109 execute
> > 
> > �/�/src/gcc/gcc/tree-vectorizer.cc:1532
> > 
> > Please submit a full bug report, with preprocessed source (by using
> > -freport-bug).
> > 
> > Please include the complete backtrace with any bug report.
> > 
> > See <https://gcc.gnu.org/bugs/> for instructions.
> > 
> > Makefile:1146: recipe for target 'options-save.o' failed
> > 
> > make[3]: *** [options-save.o] Error 1
> > 
> > 
> > 
> > That happens when building the�arm-none-linux-gnueabihf toolchain natively
> > with glibc bootstrap:
> > Build:arm-none-linux-gnueabihf
> > Host:arm-none-linux-gnueabihf
> > Target: arm-none-linux-gnueabihf
> > 
> > The compiler being used to build the toolchain is gcc 7.5.0.
> > 
> > 
> > Kind regards
> > Vasee
> > 
> > ____________________________________________________________________________
> > From: Gcc-patches <gcc-patches-bounces+vvinayag=arm.com@gcc.gnu.org> on
> > behalf of Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org>
> > Sent: 22 November 2022 08:48
> > To: gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>
> > Subject: [PATCH] tree-optimization/107672 - avoid vector mode type_for_mode
> > call �
> > The following avoids using type_for_mode on vector modes which might
> > not work for all frontends.� Instead we look for the inner mode
> > type and use build_vector_type_for_mode instead.
> > 
> > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
> > 
> > ������� PR tree-optimization/107672
> > ������� * tree-vect-stmts.cc (supportable_widening_operation): Avoid
> > ������� type_for_mode on vector modes.
> > ---
> > �gcc/tree-vect-stmts.cc | 12 +++++++++---
> > �1 file changed, 9 insertions(+), 3 deletions(-)
> > 
> > diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> > index bc0ef136f19..b35b986889d 100644
> > --- a/gcc/tree-vect-stmts.cc
> > +++ b/gcc/tree-vect-stmts.cc
> > @@ -12195,9 +12195,15 @@ supportable_widening_operation (vec_info *vinfo,
> > �������� intermediate_type
> > ���������� = vect_halve_mask_nunits (prev_type, intermediate_mode);
> > ������ else
> > -������ intermediate_type
> > -�������� = lang_hooks.types.type_for_mode (intermediate_mode,
> > -������������������������������������������ TYPE_UNSIGNED (prev_type));
> > +������ {
> > +�������� gcc_assert (VECTOR_MODE_P (intermediate_mode));
> > +�������� tree intermediate_element_type
> > +���������� = lang_hooks.types.type_for_mode (GET_MODE_INNER
> > (intermediate_mode),
> > +�������������������������������������������� TYPE_UNSIGNED (prev_type));
> > +�������� intermediate_type
> > +���������� = build_vector_type_for_mode (intermediate_element_type,
> > +���������������������������������������� intermediate_mode);
> > +������ }
> > �
> > ������ if (VECTOR_BOOLEAN_TYPE_P (intermediate_type)
> > ���������� && VECTOR_BOOLEAN_TYPE_P (prev_type)
> > --
> > 2.35.3
> > 
> > 

-- 
Alex

      reply	other threads:[~2022-11-28 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  8:48 Richard Biener
2022-11-25 13:30 ` Vaseeharan Vinayagamoorthy
2022-11-25 20:08   ` Richard Biener
2022-11-28 16:06     ` Alex Coplan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4TccFjcDHcIp95N@arm.com \
    --to=alex.coplan@arm.com \
    --cc=Vaseeharan.Vinayagamoorthy@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).