This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about ASMCONS
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Francois Bedard <Francois dot Bedard at synopsys dot com>
- Date: Mon, 19 Dec 2016 11:06:22 -0600
- Subject: Re: Question about ASMCONS
- Authentication-results: sourceware.org; auth=none
- References: <098ECE41A0A6114BB2A07F1EC238DE89661BEC1A@de02wembxa.internal.synopsys.com>
Hi Claudiu,
On Mon, Dec 19, 2016 at 12:28:54PM +0000, Claudiu Zissulescu wrote:
> I have the following rtl before asmcons pass:
>
> (insn 8 13 9 2 (set (reg:SI 157 [ list ])
> (asm_operands:SI ("") ("=g") 0 [
> (const:SI (unspec:SI [
> (symbol_ref:SI ("c_const") [flags 0x2] <var_decl 0x7f6735ad25a0 c_const>)
> ] ARC_UNSPEC_GOTOFFPC))
> ]
> [
> (asm_input:SI ("0") ../t02.c:9)
> ]
> [] ../t02.c:9)) ../t02.c:9 -1
> (nil))
[ snip ]
asmcons eventual does reg_overlap_mentioned_p on the input of the move
it created with an input of the asm. The very first thing
reg_overlap_mentioned_p tests for is if the thing is constant. And it
is here, and that makes no sense at all (since it is an output, too!)
So how did that happen?
Segher