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

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


On Wed, 2009-08-19 at 13:28 +0100, Ramana Radhakrishnan wrote:
> 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.

OK

R.


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