public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] PR56315 Improve codegen for DImode immediates - XOR
@ 2013-06-07 13:03 Kyrylo Tkachov
  2013-06-07 13:04 ` Kyrylo Tkachov
  0 siblings, 1 reply; 3+ messages in thread
From: Kyrylo Tkachov @ 2013-06-07 13:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw

Hi all,

In a similar vein to
http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01838.html this patch lets
us use the immediate forms of the eor instruction when dealing with
64-bit constants.
The insn is changed into an insn_and_split and merged with the NEON
version. A new constraint is introduced to make sure the pattern accepts
the correct range of immediates.

Now for code:
  unsigned long long xor64 (unsigned long long input)
  {
    return input ^ 0x200000004ULL;
  }

we generate:
         eor     r0, r0, #4
         eor     r1, r1, #2

without any mov immediates.

Regtested arm-none-eabi on qemu with and without -mthumb.

Ok for trunk?

Thanks,
Kyrill

gcc/
2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56315
	* config/arm/arm.md (*xordi3_insn): Change to insn_and_split.
	(xordi3): Change operand 2 constraint to arm_xordi_operand.
	* config/arm/constraints.md (Dg): New constraint.
	* config/arm/neon.md (xordi3_neon): Remove.
	(neon_veor<mode>): Generate xordi3 instead of xordi3_neon.
	* config/arm/predicates.md (arm_xordi_operand): New predicate.


gcc/testsuite/
2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56315
	* gcc.target/arm/xordi3-opt.c: New test.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-07 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 13:03 [PATCH][ARM] PR56315 Improve codegen for DImode immediates - XOR Kyrylo Tkachov
2013-06-07 13:04 ` Kyrylo Tkachov
2013-06-07 13:23   ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).