summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr61446.c
blob: fc32f63ee695923623b09463d44d4affb5d40b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR rtl-optimization/61446 */

/* { dg-do compile { target { ia32 } } } */
/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */

unsigned long long
foo (float a)
{
  const double dfa = a;
  const unsigned int hi = dfa / 0x1p32f;
  const unsigned int lo = dfa - (double) hi * 0x1p32f;

  return ((unsigned long long) hi << (4 * (8))) | lo;
}