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] |
Hi, Right now we only produce ins when a zero_extract is used on the right hand side. We can do better by adding some patterns which combine for the ins instruction. This patch adds those patterns and a testcase which shows a simple example where the code is improved. OK? Bootstrapped and tested on mips64-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: Andrew Pinski <apinski@cavium.com> Adam Nemet <anemet@caviumnetworks.com> * config/mips/mips-protos.h (mips_bitmask, mips_bitmask_p, mips_bottom_bitmask_p): Declare them. * config/mips/mips.c (mips_bitmask, mips_bitmask_p, mips_bottom_bitmask_p): New functions. * config/mips/mips.md (*insv<mode>_internal1): New pattern to match a bottom insert. (*insv<mode>_internal2): Likewise. (*insv<mode>_internal3): New pattern to match an insert. (*insv<mode>_internal4): Likewise. * config/mips/predicates.md (bitmask_operand bottom_bitmask_operand, inverse_bitmask_operand): New predicates. * testsuite/gcc.target/mips/ins-4.c: New testcase.
Attachment:
improveins.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |