This is the mail archive of the gcc-bugs@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]

middle-end/9760: Combine cannot do its job because immediate operand is used instead of register


>Number:         9760
>Category:       middle-end
>Synopsis:       Combine cannot do its job because immediate operand is used instead of register
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 19 17:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Árpád Beszédes
>Release:        gcc version 3.3 20030217 (prerelease)
>Organization:
>Environment:
BUILD & HOST: Linux 2.4.20 i686 unknown
TARGET: arm-unknown-elf
>Description:
Combine cannot combine a shift and arithmetic insn into one insn in ARM target, because immediate is used as the second operand of the arithmetic and the combined ARM instruction can use only register for the source operand.
>How-To-Repeat:
gcc -Os -S 01.c

// 01.c

void func(char c, int t)
{
  ;
}
void foo(int u)
{
  func ( 8, (u >> 24) & 0xffL );
  func ( 8, (u >> 16) & 0xffL );
  func ( 8, (u >> 8) & 0xffL );
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="combine-imm.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="combine-imm.tar.gz"

H4sIAOW2Uz4AA+2W32vbMBDH8+pA/odbwkYCqZH8K6HdyqAPfRl723NxbDkTk60g2aVd6f++kxN7
begPVki2wX0g6Md9T9JFuVMY9+XgwDDOWJKwAWOML+LItYxH29YRRnzAFkkQLcIw5Aunj9AM7NAH
czS2Tg3AYC1MrcvndakS2THOc2QmwGHMuJ+NR8O2/3HVSFWfyOq8n8l0WaZVDkpWop/d+VxrmUPR
VNk0+47fYzYHWdVQz0bDu9EQ4Gw0vO9EWk+drelszgumsJzDtIHzcwiiGXwAdlMUX2B29pSCJ68p
lo8FuPff/oL/cfAa7eH3eDH/eZh0+R8kYRi1+Z8ElP/HwPMLqYTXpbPn1+Kmdm2q5LryAtddK71K
ledyrVXcbkQ7mMN719RSV6Oh652i+TOkZm3hE7A5bIyoBRaOdlCYtBSu24ra0VUlRC529sYKe5VW
urotdYO93SqtGivPDzBiLW0tDNj0WoBQspRVWovc30oM7FYrtMGdtdLrRqCp1NfeBs+qjDu8lT+7
w/snXURPxKr171C1fhyp1m8PlL8UqDuq3MzBbnBg67LIPbt5N4c7E+GyaHBGZXC/7H4nN7igwU2V
NTAJIufXrLxOO4k6WeRk3QD1kyUOVv2l9kuhLnVL8QRnsehvZ/EzCeL4Ff/ogf+yc99NPnRv99lf
S+WlSNuD99HaNloX6ar/8W3vz90IXt/2kmQuqtobX15cnML08uu3GYR+CAH+r2ABX8AUL8cIJVIr
ZmN6D/Zg/KrUuSwk5tGhHoJX638c9PU/DrHPgzCg+n8UqP7/L/XfxMd4A+K+VPfFP95/Fp7xf9Jh
+SdFvwuRCj9BEARBEARBEARBEARBEARBEMSb+QW/noERACgAAA==


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