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]

[PATCH][ARM] PR56315 Improve codegen for DImode immediates - XOR


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.




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