This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "xordi3" pattern in arm.md
- To: Richard dot Earnshaw at arm dot com
- Subject: Re: "xordi3" pattern in arm.md
- From: Philip Blundell <philb at gnu dot org>
- Date: Wed, 16 May 2001 10:58:08 +0100
- cc: gcc at gcc dot gnu dot org
- References: <200105160935.KAA17605@cam-mail2.cambridge.arm.com>
>> void g (unsigned long long);
>> f(unsigned long long l)
>> { g(l ^ 0x1000000010000000ULL); }
>
>Right, but that constant is somewhat unusual in that both halves of it are
>valid immediate ARM constants.
Yeah. Though actually, a particular case of this (one half zero, the other half
some other valid constant) does seem to crop up quite often - inverting just
one bit, for example.
>Without it, I suspect that we would miss the optimization altogether.
Right. I tried it without and got:
x:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, current_function_anonymous_args = 0
@ link register save eliminated.
str r4, [sp, #-4]!
mov r4, #0
mov r3, #1
mvn r0, r0
adds r0, r0, r3
mvn r1, r1
adc r1, r1, r4
ldmfd sp!, {r4}
mov pc, lr
p.