View | Details | Raw Unified | Return to bug 39228
Collapse All | Expand All

(-)testsuite/gcc.c-torture/execute/pr39228.c (+36 lines)
Line 0 Link Here
1
extern void abort (void);
2
3
static int __attribute__((always_inline)) testf (float b)
4
{
5
  float c = 1.01f * b;
6
7
  return __builtin_isinff (c);
8
}
9
10
static int __attribute__((always_inline)) test (double b)
11
{
12
  double c = 1.01 * b;
13
14
  return __builtin_isinf (c);
15
}
16
17
static int __attribute__((always_inline)) testl (long double b)
18
{
19
  long double c = 1.01L * b;
20
21
  return __builtin_isinfl (c);
22
}
23
24
int main()
25
{
26
  int x;
27
28
  x = testf (__FLT_MAX__);
29
  x &= test (__DBL_MAX__);
30
  x &= testl (__LDBL_MAX__);
31
32
  if (x == 0)
33
    abort ();
34
35
  return 0;
36
}
(-)config/i386/i386.md (-1 / +18 lines)
Lines 18826-18832 Link Here
18826
  rtx scratch = gen_reg_rtx (HImode);
18826
  rtx scratch = gen_reg_rtx (HImode);
18827
  rtx res = gen_reg_rtx (QImode);
18827
  rtx res = gen_reg_rtx (QImode);
18828
18828
18829
  emit_insn (gen_fxam<mode>2_i387 (scratch, operands[1]));
18829
  if (<MODE>mode != XFmode)
18830
    {
18831
      rtx temp_mem;
18832
      rtx temp_reg = gen_reg_rtx (<MODE>mode);
18833
18834
      int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
18835
18836
      temp_mem = assign_386_stack_local (<MODE>mode, slot);
18837
      MEM_VOLATILE_P (temp_mem) = 1;
18838
18839
      emit_move_insn (temp_mem, operands[1]);
18840
      emit_move_insn (temp_reg, temp_mem);
18841
18842
      emit_insn (gen_fxam<mode>2_i387 (scratch, temp_reg));
18843
    }
18844
  else
18845
    emit_insn (gen_fxamxf2_i387 (scratch, operands[1]));
18846
18830
  emit_insn (gen_andqi_ext_0 (scratch, scratch, mask));
18847
  emit_insn (gen_andqi_ext_0 (scratch, scratch, mask));
18831
  emit_insn (gen_cmpqi_ext_3 (scratch, val));
18848
  emit_insn (gen_cmpqi_ext_3 (scratch, val));
18832
  cond = gen_rtx_fmt_ee (EQ, QImode,
18849
  cond = gen_rtx_fmt_ee (EQ, QImode,

Return to bug 39228