- To: gcc-help@xxxxxxxxxxx
- Subject: Address rejected by TARGET_LEGITIMATE_ADDRESS_P recreated in post reload CSE pass at -O2
- From: Ayonam Ray <ayonam@xxxxxxxxx>
- Date: Tue, 22 May 2012 00:43:53 +0530
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hi,
I have an address (symbolicRef + indexReg * scaleFactor) that is
rejected by my TARGET_LEGITIMATE_ADDRESS_P. However, at -O2, the same
address gets recreated in the post reload CSE pass. The symbolic
reference just after the reload is in a register and the address
"register + indexReg * scaleFactor" is a valid address for my
architecture. The CSE figures out that the symbolic reference is in a
register (the notes say so) and replaces the "register + indexReg *
scaleFactor" address with "symbolicRef + indexReg * scaleFactor".
Is there a way to prevent this from happening? Am I missing some
target definitions which is causing this? Or is it an incorrect
predicate definition?
I get the failure in "movsi" when, after the post reload CSE, it tries
to match the constraints for that memory operand. The 'm' constraint
ends up calling the TARGET_LEGITIMATE_ADDRESS_P which returns a zero
and the constraint check fails.
Thanks in advance.
Regards
Ayonam
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]