* RE: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
@ 2006-07-14 6:17 Deng Shi
2006-07-14 6:21 ` Ian Lance Taylor
0 siblings, 1 reply; 6+ messages in thread
From: Deng Shi @ 2006-07-14 6:17 UTC (permalink / raw)
To: Ian Lance Taylor, Deng Shi; +Cc: gcc-help
I just find the such a sum of -f options for -O1 on GCC 3.3.6 online
manual.
What are the others -f options indicating in -O1?
Deng
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
2006-07-14 6:17 Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately Deng Shi
@ 2006-07-14 6:21 ` Ian Lance Taylor
0 siblings, 0 replies; 6+ messages in thread
From: Ian Lance Taylor @ 2006-07-14 6:21 UTC (permalink / raw)
To: Deng Shi; +Cc: gcc-help
"Deng Shi" <Deng.Shi@synopsys.com> writes:
> I just find the such a sum of -f options for -O1 on GCC 3.3.6 online
> manual.
> What are the others -f options indicating in -O1?
-O1 turns on optimizations which are not controlled by any -f
options.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
@ 2006-07-17 0:45 Deng Shi
0 siblings, 0 replies; 6+ messages in thread
From: Deng Shi @ 2006-07-17 0:45 UTC (permalink / raw)
To: tprince; +Cc: gcc-help
Hi Tprince,
We do build on IA-32 system and running on the same system, but we still get the inconsistent result as I described in the previous mail. We have added the control function to remove the excess precision in main faction like
fpu_control_t cw = (_FPU_DEFAULT & ~_FPU_EXTENDED) | _FPU_DOUBLE;
_FPU_SETCW(cw);
Can you help to give some suggestions about which possibility may cause the inconsistent result within -O0 or -O1 optimization separately?
I will try the -ffloat-store option.
Best regards!
Deng
-----Original Message-----
From: Tim Prince [mailto:timothyprince@sbcglobal.net]
Sent: 2006年7月14日 20:28
To: Deng Shi
Cc: gcc-help@gcc.gnu.org
Subject: Re: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
Deng Shi wrote:
>
>
> -----Original Message-----
> From: Deng Shi
> Sent: 2006年7月13日 10:37
> To: 'gnu-help@gnu.org'
> Subject: Inconsistent floating point result when using G++ 3.3.6 with
> option -O0 or -O1 separately
>
> hi expert,
> I found our application tool gave the inconsistent floating point result when using different optimization level -O0 or -O1.
> Even if I used -O1 plus all the disabling options which includes in -O1, like -O1 -fno-merge-all-constants -fno-zero-initialized-in-bss -fno-function-cse -fno-keep-static-consts -fno-omit-frame-pointer -fno-merge-constants -fno-loop-optimize -fno-cprop-registers -fno-if-conversion -fno-if-conversion2 -fno-delayed-branch -fno-guess-branch-probability -fno-defer-pop -fno-crossjumping -fno-thread-jumps " which command line setting should be equal to -O0, but I still didn't get the consistent result.
> I wonder whether there is any additional optimization enabled by -O1 for C++ language which is not documented in GCC manual?
>
If you're generating x87 code (the default for ia32), -ffloat-store would be among the first options normally tried to remove extra precision. How are we to know what target you have, and which options you used?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
2006-07-14 5:13 Deng Shi
2006-07-14 5:52 ` Ian Lance Taylor
@ 2006-07-14 12:28 ` Tim Prince
1 sibling, 0 replies; 6+ messages in thread
From: Tim Prince @ 2006-07-14 12:28 UTC (permalink / raw)
To: Deng Shi; +Cc: gcc-help
Deng Shi wrote:
>
>
> -----Original Message-----
> From: Deng Shi
> Sent: 2006å¹´7æ13æ¥ 10:37
> To: 'gnu-help@gnu.org'
> Subject: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
>
> hi expert,
> I found our application tool gave the inconsistent floating point result when using different optimization level -O0 or -O1.
> Even if I used -O1 plus all the disabling options which includes in -O1, like -O1 -fno-merge-all-constants -fno-zero-initialized-in-bss -fno-function-cse -fno-keep-static-consts -fno-omit-frame-pointer -fno-merge-constants -fno-loop-optimize -fno-cprop-registers -fno-if-conversion -fno-if-conversion2 -fno-delayed-branch -fno-guess-branch-probability -fno-defer-pop -fno-crossjumping -fno-thread-jumps " which command line setting should be equal to -O0, but I still didn't get the consistent result.
> I wonder whether there is any additional optimization enabled by -O1 for C++ language which is not documented in GCC manual?
>
If you're generating x87 code (the default for ia32), -ffloat-store
would be among the first options normally tried to remove extra
precision. How are we to know what target you have, and which options
you used?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
2006-07-14 5:13 Deng Shi
@ 2006-07-14 5:52 ` Ian Lance Taylor
2006-07-14 12:28 ` Tim Prince
1 sibling, 0 replies; 6+ messages in thread
From: Ian Lance Taylor @ 2006-07-14 5:52 UTC (permalink / raw)
To: Deng Shi; +Cc: gcc-help
"Deng Shi" <Deng.Shi@synopsys.com> writes:
> I found our application tool gave the inconsistent floating point result when using different optimization level -O0 or -O1.
http://gcc.gnu.org/PR323
> Even if I used -O1 plus all the disabling options which includes in
> -O1, like -O1 -fno-merge-all-constants -fno-zero-initialized-in-bss
> -fno-function-cse -fno-keep-static-consts -fno-omit-frame-pointer
> -fno-merge-constants -fno-loop-optimize -fno-cprop-registers
> -fno-if-conversion -fno-if-conversion2 -fno-delayed-branch
> -fno-guess-branch-probability -fno-defer-pop -fno-crossjumping
> -fno-thread-jumps " which command line setting should be equal to
> -O0, but I still didn't get the consistent result.
> I wonder whether there is any additional optimization enabled by -O1
> for C++ language which is not documented in GCC manual?
-O1 turns on optimization in general, affecting code generation in a
-number of ways. -O1 is more than the sum of the -f options.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
@ 2006-07-14 5:13 Deng Shi
2006-07-14 5:52 ` Ian Lance Taylor
2006-07-14 12:28 ` Tim Prince
0 siblings, 2 replies; 6+ messages in thread
From: Deng Shi @ 2006-07-14 5:13 UTC (permalink / raw)
To: gcc-help
-----Original Message-----
From: Deng Shi
Sent: 2006年7月13日 10:37
To: 'gnu-help@gnu.org'
Subject: Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately
hi expert,
I found our application tool gave the inconsistent floating point result when using different optimization level -O0 or -O1.
Even if I used -O1 plus all the disabling options which includes in -O1, like -O1 -fno-merge-all-constants -fno-zero-initialized-in-bss -fno-function-cse -fno-keep-static-consts -fno-omit-frame-pointer -fno-merge-constants -fno-loop-optimize -fno-cprop-registers -fno-if-conversion -fno-if-conversion2 -fno-delayed-branch -fno-guess-branch-probability -fno-defer-pop -fno-crossjumping -fno-thread-jumps " which command line setting should be equal to -O0, but I still didn't get the consistent result.
I wonder whether there is any additional optimization enabled by -O1 for C++ language which is not documented in GCC manual?
Is there anybody helping me?
Best regards!
Deg
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-17 0:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-14 6:17 Inconsistent floating point result when using G++ 3.3.6 with option -O0 or -O1 separately Deng Shi
2006-07-14 6:21 ` Ian Lance Taylor
-- strict thread matches above, loose matches on Subject: below --
2006-07-17 0:45 Deng Shi
2006-07-14 5:13 Deng Shi
2006-07-14 5:52 ` Ian Lance Taylor
2006-07-14 12:28 ` Tim Prince
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).