Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. For a constant where the high and low halves only differ by a few bits, consider using pack as an intermediate step and the Zbs instructions to make final adjustments.
  2. When possible derive the upper and lower halves from a common sequence, so for example sharing a lui
    1. This can be handled during synthesis
    2. May also be capturable during reload_move2add
  3. Similarly for cases where the high half can be constructed by merely shifting the low half.
  4. Improve handling of constants where the upper and lower 32bit halves are the same and zbkb is not available.  It is believed this is a relatively small adjustment to the existing code.
  5. SImilar to the prior item with both halves equal, but when bit 31/63 are both on.  For this case generate ~val (which will necessarily have bits 31/63 off), then xor against -1 to get the final target value.
  6. Reevaluate the mvconst_internal pattern.   There's some belief that it could be eliminated or used much less often.  Right now it "lies" to the combiner and indicates it can load an arbitrary 64bit constant as a single instruction.  That's a useful property when we can to combine the constant in another instruction, but it's painful in other ways such as its interaction with the code to improve additional of constants that are not simm12, but are 2*simm12.
  7. Some constants may be generated with something like lui+shadd+addi where the lui+shadd targets a nearby constant and the final addi fixes things up.  The approach of targeting a nearby constant with a fixup at the end probably applies to most synthesis opportunities where the cost is 4+ instructions.
  8. Investigate reload_cse_move2add which should allow deriving some constants from other nearby constants.  In theory it should "just work", but we should verify and if it isn't fix it

...