This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Feb 2019 17:25:09 +0000
- Subject: [Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm
- Auto-submitted: auto-generated
- References: <bug-87984-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87984
--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #21)
> (In reply to Jakub Jelinek from comment #18)
> > We could cache a bool in struct function whether the function has any local
> > hard register vars and just propagate that info during inlining etc. and
> > just add virtual operand if there are any clobbers and any local register
> > vars (or with that condition check them).
>
> This seems to dismiss comment #17. The clobber may be invisible on GIMPLE
> due to function calls or just plain arithmetic that is turned to libcalls.
A function call must be assumed to clobber any call used registers of course.
But calls already do have vops (well, const/pure don't, and I don't think we
want to change that).
Another possibility is to just punt on trying to optimize hard register vars in
gimple optimizers, leave that to RTL only. So, punt on them in SCCVN, PRE,
FRE, etc.