[patch, ARM] Fix pr55073

Richard Earnshaw rearnsha@arm.com
Thu Nov 29 17:53:00 GMT 2012


PR 55073 is a case where scheduling appears to mess up the order of
instructions to the extent that they no-longer give the correct results.
   However, looking at the patterns, I think they are ill-defined.  IIRC
tied operands should tie a source to a destination, rather than a
destination to a source.  Failing to get this right can essentially
result in an input value being clobbered and the compiler failing to
detect this.

Because all the patterns that appear to have this violation are named
patterns that are called during expand (mainly of intrinsics), it's not
trivial to simply rename the operands, or we get bogus rtl.  Instead,
I've taken the approach of splitting expand from match.

gcc:

	* arm/neon.md (neon_vtrn<mode>_internal): Split into expand
	and insn patterns.  Re-order insn arguments to tie inputs to
	outputs.
	(neon_vzip<mode>_internal): Likewise.
	(neon_vuzp<mode>_internal): Likewise.

testsuite:

	* gcc.target/arm/pr55073.C: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr55073.diff
Type: text/x-patch
Size: 6724 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121129/798fd648/attachment.bin>


More information about the Gcc-patches mailing list