From: Jeff Law <law@redhat.com>
To: Kaushik Phatak <Kaushik.Phatak@kpitcummins.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Prafulla Thakare <Prafulla.Thakare@kpitcummins.com>
Subject: Re: [Patch : H8300] Bug fix for bit insn and minor tweaks to insns
Date: Fri, 10 Jun 2011 18:37:00 -0000 [thread overview]
Message-ID: <4DF26301.9020208@redhat.com> (raw)
In-Reply-To: <F56EA673D3E56E48804FE2B0D23EFD2D22FC98AC8E@KCINPUNHJCMS01.kpit.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/09/11 01:20, Kaushik Phatak wrote:
> Hi,
> The following patch fixes an ICE that is generated when the compiler tries
> to perform bit manipulation for logical operations when the source and
> destination address does not match. The testcase is also included in the
> patch(gcc.dg).
> The additional condition in the insn takes care of the ICE which occurs at '-O1'.
> The other insn's are reordered to give preference to bit instructions using existing
> constraints.
> Ok to apply?
>
> Thanks & Regards,
> Kaushik Phatak
> www.kpitgnutools.com
>
> 2011-06-09 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
>
> * config/h8300/h8300.md (bsetqi_msx, bclrqi_msx, bnotqi_msx): Added
> condition to disallow non-identical memory locations.
> (*andqi3_2, andqi3_1, iorqi3_1, xorqi3_1): Reorder insn to give
> preference to bit manipulation instructions.
> * gcc.dg/h8300-bit-insn-ice2.2: New testcase.
Can't the operand be MEM (reg) or MEM (const_int)? In which case
INTVAL (XEXP (operands[], 0)) is the wrong test since you shouldn't be
applying INTVAL to a REG. Furthermore, if you're trying to compare
CONST_INTs, those are shared and you can use pointer equality rather
than their underlying value.
Regardless, I think the right test is
rtx_equal_p (operands[0], operands[1], NULL)
With that change to bsetqi_msx, bclrqi_msx and bnotqi_msx this patch is OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJN8mMBAAoJEBRtltQi2kC7NjUIAJDylrPPoI6YMk4lfRwclIPT
VCzk31q3DpZ3H5CEv8e6u7DmmJl9ng78uYHXejAqTbpAn/mDOtEWasBIUIhTACFF
UgH3bK3wwhF412Dbr/6ND/dPCMiImzSUR8PC8N6S31k8q5JmXIkfVfX/oKaSH/n6
9VxyIfh7PmGRqjMlH434DyvOvH+qPfN3jSNLVHDvUeVYKI6gnfXtR8tuHTlIw4LO
eiubgvmD4RXa6Nnpeuafs8GyTCRA5jbVU2jf3ZR3jBA08YpS/cSeECd19ytSdVuS
Au20hmDPStkJwr/0kw+QtqeZRg5BP4JWF0COYQJDFQVa64Gt6LEterBmntPJr8g=
=JdgV
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2011-06-10 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 7:40 Kaushik Phatak
2011-06-10 18:37 ` Jeff Law [this message]
2011-06-13 10:57 ` Kaushik Phatak
2011-06-13 15:24 ` H.J. Lu
2011-06-13 13:16 ` Eric Botcazou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DF26301.9020208@redhat.com \
--to=law@redhat.com \
--cc=Kaushik.Phatak@kpitcummins.com \
--cc=Prafulla.Thakare@kpitcummins.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).