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, microblaze]: Adjustments to pcmp instruction generation


Adjustments to pcmp instruction generation

avoid pcmpe insns when not valuable

For pure in and equality comparisions, xor is better,
Xor is a one cycle insn as pcmp.

Pattern insns will still be used when you need to
conditionally set something to one or zero, e.g

if (a)
  return 1;
else
  return 0;

Define contraint for first operand in insn matching
fcmp as general register

Add a constraint to the cstoresf pattern forcing the use of
general regs for the operands. This avoids an ICE where the
compiler would crash on late usage of pseudo registers.

Changelog

2013-02-11  Edgar E. Iglesias <edgar.iglesias@gmail.com>

  * config/microblaze/microblaze.c (microblaze_emit_compare):
     Use xor for EQ/NE comparisions
  * config/microblaze/microblaze.md (cstoresf4): Add constraints
     (cbranchsf4): Adjust operator to comparison_operator

Attachment: 0009-microblaze-Adjustments-to-pcmp-instruction-generatio.patch
Description: 0009-microblaze-Adjustments-to-pcmp-instruction-generatio.patch


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