[Patch, microblaze]: Branch Compare unroll loops

David Holsgrove david.holsgrove@xilinx.com
Mon Jul 15 06:32:00 GMT 2013


To facilitate optimization pass understanding of the conditional
branch for microblaze, remove the UNSPEC'd signed_compare /
unsigned_compare instructions, and replace with a complete
branch_compare which will output_asm_insn the correct cmp/cmpu
depending on comparison code and signed / unsigned.

We then return the correct branch instruction.

cbranchsi now calls an expanded microblaze_expand_conditional_branch
function which will carry out compare against zero, compare EQ/NE,
and all other compares appropriately.

-funroll-loops optimization pass can now proceed

Changelog

2013-07-15  David Holsgrove <david.holsgrove@xilinx.com>

 * gcc/config/microblaze/predicates.md: Add cmp_op predicate.
 * gcc/config/microblaze/microblaze.md: Add branch_compare
   instruction which uses cmp_op predicate and emits cmp insn
   before branch.
 * gcc/config/microblaze/microblaze.c
   (microblaze_emit_compare): Rename to
   microblaze_expand_conditional_branch and consolidate logic.
   (microblaze_expand_conditional_branch): emit branch_compare
   insn instead of handling cmp op separate from branch insn.

thanks,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Patch-microblaze-Add-branch_compare-instruction.patch
Type: application/octet-stream
Size: 8207 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130715/8dd7fdf3/attachment.obj>


More information about the Gcc-patches mailing list