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 middle-end/78684] [7 Regression] ICE in create_intersect_range_checks_index, at tree-vect-loop-manip.c:2074


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

--- Comment #6 from amker at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #5)
> (In reply to amker from comment #4)
> > (In reply to Jakub Jelinek from comment #3)
> > > neg_step is true, because DR_STEP (dr_a.dr) is (ssizetype) -8.
> > > But idx_step is 0xffffffffffffffffUL.
> > > Note
> > > tree_int_cst_compare (idx_step, size_zero_node) < 0
> > > is just weird, why don't you use tree_int_cst_sgn?
> > 
> > Hi Jakub, do you mean tree_int_cst_sign_bit?  Thanks.
> 
> No, I mean what I wrote, i.e.
> /* Return an indication of the sign of the integer constant T.
>    The return value is -1 if T < 0, 0 if T == 0, and 1 if T > 0.
>    Note that -1 will never be returned if T's type is unsigned.  */
> 
> int
> tree_int_cst_sgn (const_tree t)
> ...
> defined in tree.c.

Ok, in this case I need to check idx_step is negative if it's signed type; or
idx_step has sign bit if it's unsigned type (negative step in effect). 
tree_int_cst_sgn always returning 1 for (sizetype)-1 looks not working here?

Thanks.

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