This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
target/9832: ARM: Arithmetic and move could be combined using liveness information
- From: lac at rgai dot hu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 24 Feb 2003 15:23:09 -0000
- Subject: target/9832: ARM: Arithmetic and move could be combined using liveness information
- Reply-to: lac at rgai dot hu
>Number: 9832
>Category: target
>Synopsis: ARM: Arithmetic and move could be combined using liveness information
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Mon Feb 24 15:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: László Vidács
>Release: gcc version 3.3 20030217 (prerelease)
>Organization:
>Environment:
BUILD & HOST: Linux 2.4.20 i686 unknown
TARGET: arm-unknown-elf
>Description:
Arithmetic and move instructions are replaced by a combined arithmetic in ARM target. The combine cannot be done if the destination of the arithmetic is also used. However, if based on liveness information this destination is never used the combine could be safely applied.
For example, in file ... if r4 is not used after the and instruction, the combine can be applied as in the modified file.
>How-To-Repeat:
gcc -S -Os 01.i
// 01.i
# 1 "01.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "01.c"
void func(char c, int t)
{
;
}
void foo(int u)
{
func ( 8, (u >> 24) & 0xffL );
func ( 8, (u >> 16) & 0xffL );
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="combine-using-liveness.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="combine-using-liveness.tar.gz"
H4sIAC00Wj4AA+2WUWvbMBDH82pDv8OtYSOB1Ei245R2K4M+9KXsbc/BseVMTLaCJJd2pd99JzvO
1q3rYJB0lPtBkHT6+3SSfOcwHsnRnmGcsSxjI8YYX8xT3zKe9q0nzpIRW2RxliYxS7jXp0k2Arbv
wDytdbkBGK2Fcbr+sy5XojhEPAdmDByOGY+K47Drvl+1UrkT2VwMhkLXdd6UoGQjBmP/wI2WJVRt
U0yKL3iGxQxk48BNw/sQ4Dx82Aq0nnh729u9HiZwOoNJCxcXEKdTeAfstqquYXr+hIBnjwQP4Usf
2asCb9Luf41n85/HWbzNf54uFqzLfzRR/h+AIKqkEkGf0UdhEDlx63ybK7lugth310qvchX4xOwU
dxvRDWbw1jdO6uYo9L0znP4IuVlb+ABsBhsjnMDS0Q0qk9fCdztRN1o2QpRiO99aYZd5o5u7WrfY
23rp1Fh7voIRa2mdMGDzGwFCyVo2uRNl1EsMbL1V2uDKWul1K3Cq1jfBBmNVxgdv5bch+Ohk2NET
e9X6x1a1frxTrf99o/y5jfpQ5WYGdoMD6+qqDOzmzQzuTYpuccJPKoPrFQ9buUGHBhdV1sA4Tv1z
7SoYtON0kKVeNgxQPz7FwWp3qTsN/nLvimdoxbK/s47j+fznNdNfnamyFnm38i5c24XrQ13t3p7+
AvyR4vn3pyxL0bjg+Ory8gwmV58+TyGJEogZS1jMFzDB0zVCidyKKb6iL50xrwvGl7UuZSUxj/b1
Ifhr/U/nQ/2fswztPMY/glT/DwHVf6r/z9d//nv9p5JPEARBEARBEARBEARBEARBEATx3/IdCdjt
dAAoAAA=