ia64.md (divdf3_internal_thr): Fix algorithm.

* config/ia64/ia64.md (divdf3_internal_thr): Fix algorithm.
	* testsuite/gcc.dg/20040303-1.c: New test.

From-SVN: r78934
This commit is contained in:
Steve Ellcey 2004-03-04 21:21:36 +00:00 committed by Steve Ellcey
parent 56bab4461e
commit aa42f99db9
3 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-03-04 Steve Ellcey <sje@cup.hp.com>
* config/ia64/ia64.md (divdf3_internal_thr): Fix algorithm.
* testsuite/gcc.dg/20040303-1.c: New test.
2004-03-04 Steven Bosscher <stevenb@suse.de>
* ppro.md: Rewrite as a DFA pipeline description.

View File

@ -3177,7 +3177,7 @@
(cond_exec (ne (match_dup 5) (const_int 0))
(parallel [(set (match_dup 9)
(float_truncate:DF
(mult:XF (match_dup 7) (match_dup 3))))
(mult:XF (match_dup 7) (match_dup 6))))
(use (const_int 1))]))
(cond_exec (ne (match_dup 5) (const_int 0))
(parallel [(set (match_dup 4)

View File

@ -0,0 +1,20 @@
/* Test floating point division on ia64. There was a bug in the
max-throughput version of the inline division code. Expecting an
exact value from a floating point expression is unwise but GCC
depends on it in allocno_compare. */
/* { dg-do run { target ia64-*-* } } */
/* { dg-options "-minline-float-divide-max-throughput" { target ia64-*-* } } */
extern void abort (void);
volatile int i = 24;
volatile int j = 30;
volatile int k = 1;
int main()
{
int pri2 = (((double) i / j) * (10000 / 1000) * k);
if (pri2 != 8) abort();
return 0;
}