public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65225] New: [AArch64] Various aarch64_rtx_costs improvements
@ 2015-02-26 18:00 ktkachov at gcc dot gnu.org
  2015-02-26 18:03 ` [Bug target/65225] " ktkachov at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2015-02-26 18:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65225

            Bug ID: 65225
           Summary: [AArch64] Various aarch64_rtx_costs improvements
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
            Target: aarch64*

The aarch64 rtx costs walker could be improved. Some particular areas:

- In the MINUS case, the cost of new_op1 is not included at all
- In the PLUS and MINUS case, extends and extended shifts are costed as
alu_arith rather than extend_arith
- In the PLUS and MINUS case if there is a ASHIFT or MULT after an
extend/extended shift, the cost calculated in rtx_mult_cost is as if it was a
plain PLUS/MINUS. If the multiply is by a power of 2, it calculates the cost as
a arith_shift rather than extend_arith. If it was ASHIFT the cost is wrong as
it expects a MULT rather than ASHIFT, so shift immediates which happen to be a
power of 2 get a different cost.
- In the ASHIFT case, if there is an extend the cost of extend should be used
rather than a shift.
ASHIFT 1 should use alu cost rather than shift cost (we emit an add if shift
cost is higher than alu cost)
- In the ASHIFRT/LSHIFTRT case the extend logic is missing.
- In the ABS case for integer, speed cost should be 2 ALU instructions rather
than 4.
- In the and-immediate case look into handling ZERO_EXTRACT.
- The NOT case misses logic for shifts (despite the comment, calculating shift
cost separately is not correct) - this can be costed as ORN with zero similar
to the way NEG works.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-02  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 18:00 [Bug target/65225] New: [AArch64] Various aarch64_rtx_costs improvements ktkachov at gcc dot gnu.org
2015-02-26 18:03 ` [Bug target/65225] " ktkachov at gcc dot gnu.org
2015-05-15 14:38 ` ramana at gcc dot gnu.org
2015-05-15 14:40 ` ktkachov at gcc dot gnu.org
2015-06-02  9:21 ` ktkachov at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).