This is the mail archive of the gcc-patches@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]

Patch (rs6000): Fix insvs1_internal1 pattern (again)


The change to this pattern on 05-18 broke things as demonstrated by
the example 20050603-2. The problem Devang was trying to fix with
that patch is that the rotate done by rlwimi was picking up and storing
garbage (sign) bits from the high end of the word, rather than shifting in 0s
as the semantics of the RTL pattern call for. The earlier patch shortened
the store so it didn't store those garbage bits, but this is wrong; you
really need to store 0s. I don't believe the semantics of the pattern can be
implemented in a single PPC instruction.


This patch changes the pattern to match rotate rather than ashift, which
matches the semantics of the rlwimi instruction. The other test case
(from David) checks that the rotate is being generated. Bootstrapped and
tested on darwin. OK?


Attachment: diffs9a.txt
Description: Text document

Attachment: 20050603-2.c
Description: Text document

Attachment: 20050603-3.c
Description: Text document



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