[Bug tree-optimization/94920] Failure to optimize abs pattern from arithmetic with selected operands based on comparisons with 0

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 25 22:23:18 GMT 2022


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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> (In reply to Andrew Pinski from comment #6)
> > (In reply to Paul Hua from comment #5)
> > > 
> > > Yes, we should do. This also fails the ABS_EXPR scan-tree-dump on LoongArch.
> > 
> > And on riscv32. I will look into that failure later this week.
> 
> I am suspecting it is because for both LoongArch and RISCV,
> logical-op-non-short-circuit defualts to 0. I am going to debug it right now.

Oh I see the issue. it is not related at all to logical-op-non-short-circuit
but rather than the testcase should be split into two, one for the scalar and
one for the vector case. And then the vector case should match not at optimized
but right before vector lowering happens, maybe in forwprop1 or 2.


More information about the Gcc-bugs mailing list