RFC: [ARM] Fix ICE with generation of movt and movw instructions.

Ramana Radhakrishnan ramana.radhakrishnan@arm.com
Wed Aug 19 12:55:00 GMT 2009


Hi,

I hit an ICE in twolf SPEC2000 with trunk recently and by looking in gdb
I can see that the ICE is in the printing of the constant pools and that
we get a constant pool entry for a HIGH value. 


(insn 396 395 397 (unspec_volatile [
            (high:SI (const_int -10000000 [0xffffffffff676980]))
        ] 6) 333 {consttable_4} (nil))


Instead of fixing the printer, what this patch does is to describe the
movt pattern essentially as setting the top 16 bits using a zero_extract
rather than as a lo_sum rtx and the setting of the higher 16 bits as a
direct move rather than a high rtx. This we believe gives more
opportunity for the combiner and other parts to optimize and combine
things more. Without this patch in the original testcase the we end up
matching *t / Uvi in *arm_movsi_vfp / *thumb_movsi_vfp. 

I've tested the attached patch on arm-none-eabi cross for a Cortex-A8 on
qemu with no regressions. Ok to commit for trunk ? 


cheers
Ramana

2009-08-19  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
	    Richard Earnshaw  <richard.earnshaw@arm.com>

	* config/arm/arm.c (arm_emit_movpair): Handle CONST_INT.
	* config/arm/arm.md (*arm_movtas_ze): New pattern for
	movt.

2009-08-19  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
	    Richard Earnshaw  <richard.earnshaw@arm.com>

	* testsuite/gcc.target/arm/20090811-1.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-twolf-ICE-fixer.patch
Type: text/x-patch
Size: 2667 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090819/72188f7a/attachment.bin>


More information about the Gcc-patches mailing list