This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/61298] redundant compare instructions for powerpc64
- From: "bergner at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jun 2014 15:41:10 +0000
- Subject: [Bug target/61298] redundant compare instructions for powerpc64
- Auto-submitted: auto-generated
- References: <bug-61298-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61298
--- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I think I have seen this bug before. The problem comes from using
> non-logical compares for equal but logical compares for the others.
Maybe you were thinking of PR16458 ? That bugzilla did try and solve
the problem that the old code always wanted to use signed compares for
equal/not equal. The old code in rs6000.c did have the test for the
subreg and SUBREG_PROMOTED_UNSIGNED_P. I moved that to the new
unsigned_reg_p() that richi requested and added the test for REG_P
and TYPE_UNSIGNED (added revision 186312).
I can say that unsigned_reg_p() probably doesn't catch every case
where we're doing an unsigned compare and force it to use non
signed compare. Since you have a subreg, have you looked at
how SUBREG_PROMOTED_UNSIGNED_P is set? Is that supposed to be
set for your case?