This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]