On 11/25/13 23:53, David Holsgrove wrote:
Hi Michael,

I've attached patch based on latest gcc master. Please apply when ready.

Changelog

2013-11-26  David Holsgrove <david.holsgr...@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

On 15 July 2013 14:58, David Holsgrove <david.holsgr...@xilinx.com> wrote:
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.holsgr...@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

gcc-head:  Committed revision 208055.
gcc-4_8_branch:  Committed revision 208056.

--
Michael Eager    ea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Reply via email to