[PATCH] Fix rtx_equal_p and similar predicates on ASM_OPERANDS/ASM_INPUT (PR rtl-optimization/46865)
Chung-Lin Tang
cltang@codesourcery.com
Fri Dec 10 12:56:00 GMT 2010
On 2010/12/10 06:06, Jakub Jelinek wrote:
> The last operand of ASM_OPERANDS and ASM_INPUT is a RTL locator,
> for which we unfortunately don't guarantee uniqueness. One has
> to call locator_eq to actually compare them.
> On the testcases below, without -save-temps the locators are equal
> while without them some other location_t got a locator in between.
Actually, I think the issue is not just about comparing locators, but
rather: why do you need locator equality for ASM_INPUT/ASM_OPERANDS to
be equivalent? The checking of the other fields should be sufficient.
This way for the testcase, the non-macro version would then also be
combined into a single asm.
I was about to submit this patch, which simply skips the ending 'i'
field for ASM_INPUT/ASM_OPERANDS when checking equivalence. Bootstrapped
and tested on i686 and x86_64; tested on ARM-Linux with QEMU.
Thanks,
Chung-Lin
2010-12-10 Chung-Lin Tang <cltang@codesourcery.com>
PR rtl-optimization/46865
* rtl.c (rtx_equal_p_cb): Skip location operand when comparing
for equivalence.
(rtx_equal_p): Same.
* jump.c (rtx_renumbered_equal_p): Same.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: asm.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101210/e8faa2ab/attachment.ksh>
More information about the Gcc-patches
mailing list