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: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step


On Mon, May 21, 2012 at 12:56 AM, H.J. Lu <hjl.tools@gmail.com> wrote:

>>> #include <stdio.h>
>>>
>>> ?int
>>> ?main(int argc, char **argv)
>>> ?{
>>> ?unsigned int number = 0;
>>> ?int result0, result1, result2, result3;
>>>
>>> ?result0 = __builtin_ia32_rdrand32_step (&number);
>>> ?result1 = __builtin_ia32_rdrand32_step (&number);
>>> ?result2 = __builtin_ia32_rdrand32_step (&number);
>>> ?result3 = __builtin_ia32_rdrand32_step (&number);
>>> ?printf("%d: %d\n", result0, number);
>>> ?printf("%d: %d\n", result1, number);
>>> ?printf("%d: %d\n", result2, number);
>>> ?printf("%d: %d\n", result3, number);
>>> ?return 0;
>>> ?}
>>>
>>
>> int test (void)
>> {
>> ?unsigned int number = 0;
>> ?int result0, result1, result2, result3;
>>
>> ?result0 = __builtin_ia32_rdrand32_step (&number);
>> ?result1 = __builtin_ia32_rdrand32_step (&number);
>> ?result2 = __builtin_ia32_rdrand32_step (&number);
>> ?result3 = __builtin_ia32_rdrand32_step (&number);
>>
>> ?return result0 + result1 +result2 + result3;;
>> }
>>
>> This is the simplest, and also good test.
>>
>
> Is this patck OK for trunk, 4.7 and 4.6?

OK everywhere, without double semicolon in the test.

Thanks,
Uros.


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