public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code @ 2005-01-04 12:38 tbptbp at gmail dot com 2005-01-04 12:39 ` [Bug rtl-optimization/19252] " tbptbp at gmail dot com ` (10 more replies) 0 siblings, 11 replies; 12+ messages in thread From: tbptbp at gmail dot com @ 2005-01-04 12:38 UTC (permalink / raw) To: gcc-bugs Somehow fpu comparisons are used in SSE heavy code with -mfpmath=sse. Case in point (not from the testcase): 401447: fldz [snip lots of SSE only operations] 401535: movss %xmm2,0xc(%esp) 40153b: flds 0xc(%esp) 40153f: fcomip %st(1),%st 401541: jbe 401650 I couldn't reduce further the attached testcase, but it's really obvious something's wrong the generated code for fp_compare vs pristine_intersection. Switches: -O3 -march=k8 -mfpmath=sse -ffast-math -fomit-frame-pointer -- Summary: sub optimal use of fpu comparisons in SSE code Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbptbp at gmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com @ 2005-01-04 12:39 ` tbptbp at gmail dot com 2005-01-04 13:00 ` [Bug target/19252] " uros at kss-loka dot si ` (9 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: tbptbp at gmail dot com @ 2005-01-04 12:39 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From tbptbp at gmail dot com 2005-01-04 12:39 ------- Created an attachment (id=7870) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7870&action=view) All hell broke lose -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com 2005-01-04 12:39 ` [Bug rtl-optimization/19252] " tbptbp at gmail dot com @ 2005-01-04 13:00 ` uros at kss-loka dot si 2005-01-04 14:05 ` uros at kss-loka dot si ` (8 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: uros at kss-loka dot si @ 2005-01-04 13:00 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From uros at kss-loka dot si 2005-01-04 13:00 ------- Some discussion: http://gcc.gnu.org/ml/gcc/2004-12/msg01027.html This PR could be related to: PR 19009: Loading of FP constants into FP reg via SSE reg PR 19250: minss/maxss SSE insn not generated for -mfpmath=sse -- What |Removed |Added ---------------------------------------------------------------------------- CC| |uros at kss-loka dot si Component|rtl-optimization |target GCC build triplet| |pentium3-*-* GCC target triplet| |pentium3-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com 2005-01-04 12:39 ` [Bug rtl-optimization/19252] " tbptbp at gmail dot com 2005-01-04 13:00 ` [Bug target/19252] " uros at kss-loka dot si @ 2005-01-04 14:05 ` uros at kss-loka dot si 2005-01-04 15:24 ` kcook at gcc dot gnu dot org ` (7 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: uros at kss-loka dot si @ 2005-01-04 14:05 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From uros at kss-loka dot si 2005-01-04 14:05 ------- Adding -mno-80387 to flags doesn't generate fcomip anymore. But when I try to compile povray with '-O3 -march=pentium4 -mno-80387 -mfpmath=sse -ffast-math' I got into: bbox.cpp: In function 'void build_area_table(BBOX_TREE**, long int, long int, double*)': bbox.cpp:1753: error: insn does not satisfy its constraints: (insn 216 200 217 5 (set (reg:CCFP 17 flags) (compare:CCFP (reg:DF 10 st(2)) (reg/v:DF 9 st(1) [orig:68 bmin$1 ] [68]))) 25 {*cmpfp_i_sse_only} (nil) (nil)) bbox.cpp:1753: internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1567 Please submit a full bug report, -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (2 preceding siblings ...) 2005-01-04 14:05 ` uros at kss-loka dot si @ 2005-01-04 15:24 ` kcook at gcc dot gnu dot org 2005-01-06 14:41 ` bangerth at dealii dot org ` (6 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: kcook at gcc dot gnu dot org @ 2005-01-04 15:24 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- CC| |kcook at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (3 preceding siblings ...) 2005-01-04 15:24 ` kcook at gcc dot gnu dot org @ 2005-01-06 14:41 ` bangerth at dealii dot org 2005-01-07 11:32 ` uros at kss-loka dot si ` (5 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: bangerth at dealii dot org @ 2005-01-06 14:41 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2005-01-06 14:40 ------- Some more discussion: http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00176.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (4 preceding siblings ...) 2005-01-06 14:41 ` bangerth at dealii dot org @ 2005-01-07 11:32 ` uros at kss-loka dot si 2005-01-11 22:35 ` pinskia at gcc dot gnu dot org ` (4 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: uros at kss-loka dot si @ 2005-01-07 11:32 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From uros at kss-loka dot si 2005-01-07 11:32 ------- Also some discussion here: http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00394.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (5 preceding siblings ...) 2005-01-07 11:32 ` uros at kss-loka dot si @ 2005-01-11 22:35 ` pinskia at gcc dot gnu dot org 2005-01-12 2:48 ` rth at gcc dot gnu dot org ` (3 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-01-11 22:35 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization, ssemmx http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (6 preceding siblings ...) 2005-01-11 22:35 ` pinskia at gcc dot gnu dot org @ 2005-01-12 2:48 ` rth at gcc dot gnu dot org 2005-01-14 0:34 ` cvs-commit at gcc dot gnu dot org ` (2 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: rth at gcc dot gnu dot org @ 2005-01-12 2:48 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rth at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-01-12 02:48:49 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (7 preceding siblings ...) 2005-01-12 2:48 ` rth at gcc dot gnu dot org @ 2005-01-14 0:34 ` cvs-commit at gcc dot gnu dot org 2005-01-14 0:55 ` rth at gcc dot gnu dot org 2005-01-14 0:56 ` pinskia at gcc dot gnu dot org 10 siblings, 0 replies; 12+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2005-01-14 0:34 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-14 00:34 ------- Subject: Bug 19252 CVSROOT: /cvs/gcc Module name: gcc Changes by: rth@gcc.gnu.org 2005-01-14 00:33:51 Modified files: gcc : ChangeLog gcc/config/i386: i386-protos.h i386.c i386.md Log message: PR target/19099 PR target/19250 PR target/19252 * config/i386/i386.md (cmpdf, cmpsf, bunordered, bordered, buneq, bunge, bungt, bunle, bunlt, bltgt): Enable for TARGET_SSE_MATH, not just TARGET_SSE. (cmpfp_i_387): Rename from cmpfp_i. Move after sse patterns. (cmpfp_i_mixed): Rename from cmpfp_i_sse; use for TARGET_MIX_SSE_I387. (cmpfp_i_sse): Rename from cmpfp_i_sse_only; use for TARGET_SSE_MATH. (cmpfp_iu_mixed, cmpfp_iu_sse, cmpfp_iu_387): Similarly. (fp_jcc_1_mixed, fp_jcc_1_sse, fp_jcc_1_387): Similarly. (fp_jcc_2_mixed, fp_jcc_2_sse, fp_jcc_2_387): Similarly. (fp_jcc_3_387, fp_jcc_4_387, fp_jcc_5_387, fp_jcc_6_387, fp_jcc_7_387, fp_jcc_8_387): Rename from fp_jcc_N. (movdicc_c_rex64): Rename with '*'. (movsfcc, movdfcc): Add checks for 387 and sse math to condition. (movsfcc_1_sse_min, movsfcc_1_sse_max, movsfcc_1_sse): New. (movsfcc_1_387): Rename from movsfcc_1. (movdfcc_1_sse_min, movdfcc_1_sse_max, movdfcc_1_sse): New. (movdfcc_1, movdfcc_1_rex64): Add check for 387. (sminsf3, smaxsf3, smindf3, smaxdf3): New. (minsf3, minsf, minsf_nonieee, minsf_sse, mindf3, mindf, mindf_nonieee, mindf_sse, maxsf3, maxsf, maxsf_nonieee, maxsf_sse, maxdf3, maxdf, maxdf_nonieee, maxdf_sse, sse_movsfcc, sse_movsfcc_eq, sse_movdfcc, sse_movdfcc_eq, sse_movsfcc_const0_1, sse_movsfcc_const0_2, sse_movsfcc_const0_3, sse_movsfcc_const0_4, sse_movdfcc_const0_1, sse_movdfcc_const0_2, sse_movdfcc_const0_3, sse_movdfcc_const0_4): Remove. * config/i386/i386.c (ix86_expand_fp_movcc): For TARGET_SSE_MATH, recognize min/max early. Update for changed sse cmove patterns. (ix86_split_sse_movcc): New. * config/i386/i386-protos.h: Update. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7114&r2=2.7115 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386-protos.h.diff?cvsroot=gcc&r1=1.125&r2=1.126 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.776&r2=1.777 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.605&r2=1.606 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (8 preceding siblings ...) 2005-01-14 0:34 ` cvs-commit at gcc dot gnu dot org @ 2005-01-14 0:55 ` rth at gcc dot gnu dot org 2005-01-14 0:56 ` pinskia at gcc dot gnu dot org 10 siblings, 0 replies; 12+ messages in thread From: rth at gcc dot gnu dot org @ 2005-01-14 0:55 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From rth at gcc dot gnu dot org 2005-01-14 00:55 ------- Fixed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/19252] sub optimal use of fpu comparisons in SSE code 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com ` (9 preceding siblings ...) 2005-01-14 0:55 ` rth at gcc dot gnu dot org @ 2005-01-14 0:56 ` pinskia at gcc dot gnu dot org 10 siblings, 0 replies; 12+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-01-14 0:56 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19252 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-01-14 0:56 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-01-04 12:38 [Bug rtl-optimization/19252] New: sub optimal use of fpu comparisons in SSE code tbptbp at gmail dot com 2005-01-04 12:39 ` [Bug rtl-optimization/19252] " tbptbp at gmail dot com 2005-01-04 13:00 ` [Bug target/19252] " uros at kss-loka dot si 2005-01-04 14:05 ` uros at kss-loka dot si 2005-01-04 15:24 ` kcook at gcc dot gnu dot org 2005-01-06 14:41 ` bangerth at dealii dot org 2005-01-07 11:32 ` uros at kss-loka dot si 2005-01-11 22:35 ` pinskia at gcc dot gnu dot org 2005-01-12 2:48 ` rth at gcc dot gnu dot org 2005-01-14 0:34 ` cvs-commit at gcc dot gnu dot org 2005-01-14 0:55 ` rth at gcc dot gnu dot org 2005-01-14 0:56 ` pinskia at gcc dot gnu dot org
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).