Commit a0d169d1 by Andrew Pinski Committed by Andrew Pinski

New bswap testcase.


2019-12-08  Andrew Pinski  <apinski@marvell.com>

        * gcc.c-torture/execute/bswap-3.c: New test.

From-SVN: r279100
parent 58ccb8ec
2019-12-08 Andrew Pinski <apinski@marvell.com>
* gcc.c-torture/execute/bswap-3.c: New test.
2019-12-08 Sandra Loosemore <sandra@codesourcery.com> 2019-12-08 Sandra Loosemore <sandra@codesourcery.com>
Revert: Revert:
......
/* { dg-require-effective-target int32plus } */
int f(unsigned int a) __attribute__((noipa));
int f(unsigned int a)
{
return ((__builtin_bswap32(a))>>24) & 0x3;
}
int g(unsigned int a) __attribute__((noipa));
int g(unsigned int a)
{
return a&0x3;
}
int main(void)
{
for (int b = 0; b <= 0xF; b++)
{
if (f(b) != g(b))
__builtin_abort ();
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment