From: Peter Bergner <bergner@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: "Kewen.Lin" <linkw@linux.ibm.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] rs6000: Don't ICE when we disassemble an MMA variable [PR101322]
Date: Wed, 31 Aug 2022 17:01:04 -0500 [thread overview]
Message-ID: <67da6fae-184d-4414-cb04-53e295abc477@linux.ibm.com> (raw)
In-Reply-To: <20220831205126.GU25951@gate.crashing.org>
On 8/31/22 3:51 PM, Segher Boessenkool wrote:
> On Wed, Aug 31, 2022 at 01:53:48PM -0500, Peter Bergner wrote:
>> Question for my own education, when would you use VIEW_CONVERT_EXPR over NOP_EXPR?
>
> VIEW_CONVERT_EXPR is essentially a bit_cast. Only use it when you need
> that, it is sub-optimal if you don't.
Ok. I believe I added a couple of other similar uses of VIEW_CONVERT_EXPR for
pointer casts on the __builtin_vsx_lxvp/stxvp built-ins. I'll try converting
those to use NOP_EXPR too in a separate cleanup patch. Thanks!
>> - tree src_type = TREE_TYPE (src_ptr);
>> + tree src_type = (fncode == RS6000_BIF_DISASSEMBLE_ACC)
>> + ? ptr_vector_quad_type_node : ptr_vector_pair_type_node;
>
> If you split a?b:c over multiple lines, please make it three lines.
Can do, however...
>> ...and of course, now I can't recreate that issue at all and the
>> ptr_vector_*_type use work fine now. Strange! ...so ok, changed.
>> Maybe the behavior changed since my PR106017 fix went in???
>
> That is my best guess as well. But, how did that help this test?
It didn't. :-) During my bootstrap, I hit the gimple verification issue
I mentioned seeing earlier. My problem was I thought I hit it with the
test case, but it was exposed on a different test case in the testsuite.
Here's what I'm seeing, which only happens when using -O0 -flto:
rain6p1% gcc -O0 -mcpu=power10 -flto pr102347.c
lto1: internal compiler error: in gimple_canonical_types_compatible_p, at tree.cc:13677
0x11930a97 gimple_canonical_types_compatible_p(tree_node const*, tree_node const*, bool)
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/tree.cc:13677
0x1192f1ab verify_type_variant
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/tree.cc:13377
0x11930beb verify_type(tree_node const*)
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/tree.cc:13700
0x106bbd37 lto_fixup_state
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto-common.cc:2629
0x106bbff3 lto_fixup_decls
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto-common.cc:2660
0x106bce13 read_cgraph_and_symbols(unsigned int, char const**)
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto-common.cc:2901
0x1067bcbf lto_main()
/home/bergner/gcc/gcc-fsf-mainline-pr101322/gcc/lto/lto.cc:656
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.
lto-wrapper: fatal error: /home/bergner/gcc/build/gcc-fsf-mainline-pr101322-debug/gcc/xgcc returned 1 exit status
compilation terminated.
/home/bergner/binutils/install/binutils-power10/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
The problem goes away if I use use -O1 or above, I drop -flto or I use
the code I originally posted without the ptr_vector_*_type
The assert in gimple_canonical_types_compatible_p() we're hitting is:
13673 default:
13674 /* Consider all types with language specific trees in them mutually
13675 compatible. This is executed only from verify_type and false
13676 positives can be tolerated. */
13677 gcc_assert (!in_lto_p);
13678 return true;
I have no idea why ptr_vector_*_type would behave differently here than
build_pointer_type (vector_*_type_node). Using the build_pointer_type()
fixed it for me, so that's why I went with it. :-) Maybe this is a bug
in lto???
Peter
next prev parent reply other threads:[~2022-08-31 22:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 3:50 Peter Bergner
2022-08-31 9:22 ` Kewen.Lin
2022-08-31 13:59 ` Peter Bergner
2022-08-31 18:53 ` Peter Bergner
2022-08-31 20:51 ` Segher Boessenkool
2022-08-31 22:01 ` Peter Bergner [this message]
2022-08-31 23:08 ` Segher Boessenkool
2022-08-31 23:29 ` Peter Bergner
2022-09-01 8:29 ` Kewen.Lin
2022-09-01 14:17 ` Peter Bergner
2022-09-05 8:11 ` Kewen.Lin
2022-09-01 8:28 ` Kewen.Lin
2022-09-01 14:41 ` Segher Boessenkool
2022-08-31 15:58 ` Segher Boessenkool
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=67da6fae-184d-4414-cb04-53e295abc477@linux.ibm.com \
--to=bergner@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=segher@kernel.crashing.org \
/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).