public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/21462] if statement not converted to MIN_EXPR [not found] <bug-21462-4@http.gcc.gnu.org/bugzilla/> @ 2012-02-07 21:07 ` pinskia at gcc dot gnu.org 0 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-02-07 21:07 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21462 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10050 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-07 21:06:42 UTC --- Only Tst5 is not optimized, we need to do something like what is needed to be done for PR 10050. Note this optimization is invalid for the C11/C++ memory model. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <bug-21462-7559@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/21462] if statement not converted to MIN_EXPR [not found] <bug-21462-7559@http.gcc.gnu.org/bugzilla/> @ 2007-04-18 9:00 ` rguenth at gcc dot gnu dot org 0 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-04-18 9:00 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2007-04-18 10:00 ------- Micha, this one should be catched by your conditional store patch. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org, matz at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21462 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/21462] New: if statement not converted to MIN_EXPR @ 2005-05-09 8:01 micis at gmx dot de 2005-05-09 21:33 ` [Bug tree-optimization/21462] " pinskia at gcc dot gnu dot org 2005-05-09 21:34 ` pinskia at gcc dot gnu dot org 0 siblings, 2 replies; 4+ messages in thread From: micis at gmx dot de @ 2005-05-09 8:01 UTC (permalink / raw) To: gcc-bugs Consider the following short program: #include <algorithm> void Tst1(short* __restrict__ SrcP, short* __restrict__ MinP, int Len) { for (int x=0; x<Len; x++) MinP[x] = SrcP[x] <? MinP[x]; } void Tst2(short* __restrict__ SrcP, short* __restrict__ MinP, int Len) { for (int x=0; x<Len; x++) MinP[x] = (SrcP[x]<MinP[x]) ? SrcP[x] : MinP[x]; } void Tst3(short* __restrict__ SrcP, short* __restrict__ MinP, int Len) { for (int x=0; x<Len; x++) MinP[x] = (SrcP[x]<MinP[x]) ? (short)SrcP[x] : MinP[x]; } void Tst4(short* __restrict__ SrcP, short* __restrict__ MinP, int Len) { for (int x=0; x<Len; x++) MinP[x] = std::min(SrcP[x], MinP[x]); } void Tst5(short* __restrict__ SrcP, short* __restrict__ MinP, int Len) { for (int x=0; x<Len; x++) if (SrcP[x]<MinP[x]) MinP[x]=SrcP[x]; } If I compile it with gcc41 -O2 -ftree-vectorize -ftree-vectorizer-verbose=5 function Tst1/Tst2/Tst3 gets vectorized but Tst4/Tst5 not. The reason for this is the first three funtions result in a MIN_EXPR while std::min and the if statement generate conditional code which the vectorizer does not recognize. Michael Cieslinski -- Summary: if statement not converted to MIN_EXPR Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: micis at gmx dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21462 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/21462] if statement not converted to MIN_EXPR 2005-05-09 8:01 [Bug tree-optimization/21462] New: " micis at gmx dot de @ 2005-05-09 21:33 ` pinskia at gcc dot gnu dot org 2005-05-09 21:34 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-05-09 21:33 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-09 21:33 ------- *** Bug 21463 has been marked as a duplicate of this bug. *** -- What |Removed |Added ---------------------------------------------------------------------------- CC| |tbptbp at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21462 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/21462] if statement not converted to MIN_EXPR 2005-05-09 8:01 [Bug tree-optimization/21462] New: " micis at gmx dot de 2005-05-09 21:33 ` [Bug tree-optimization/21462] " pinskia at gcc dot gnu dot org @ 2005-05-09 21:34 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-05-09 21:34 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-09 21:34 ------- Confirmed, well the " if (SrcP[x]<MinP[x]) MinP[x]=SrcP[x];" issue is slightly different. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |missed-optimization Last reconfirmed|0000-00-00 00:00:00 |2005-05-09 21:34:29 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21462 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-07 21:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-21462-4@http.gcc.gnu.org/bugzilla/> 2012-02-07 21:07 ` [Bug tree-optimization/21462] if statement not converted to MIN_EXPR pinskia at gcc dot gnu.org [not found] <bug-21462-7559@http.gcc.gnu.org/bugzilla/> 2007-04-18 9:00 ` rguenth at gcc dot gnu dot org 2005-05-09 8:01 [Bug tree-optimization/21462] New: " micis at gmx dot de 2005-05-09 21:33 ` [Bug tree-optimization/21462] " pinskia at gcc dot gnu dot org 2005-05-09 21:34 ` 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).