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 rtl-optimization/84157] [8 Regression] [nvptx] ICE: RTL check: expected code 'reg', have 'lshiftrt'


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84157

--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #6)
> (In reply to Segher Boessenkool from comment #5)
> > That looks good.  
> that patch was by Uros though.

Yes I misread.  Uros: that patch is pre-approved.

> > But maybe the REG_P check should be in the outer "if"?
> > Slightly easier and safer to exit as early as possible.
> 
> I'm not familiar with this code, but AFAIU already before r257270 we can
> generate a SUBREG of an LSHIFTRT, which is incorrect RTL. And the patch does
> not fix that, it only fixes the ICE introduces in r257270.

It doesn't have to be fixed: the generated RTL is passed to recog, which
will fail it.  That is what combine does with everything (it even creates
invalid RTL on purpose to abort combination attempts!)

It seems a bit neater and easier and safer to test for REG_P a bit earlier,
but the patch is fine as-is.

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