From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6927 invoked by alias); 26 Mar 2010 20:27:13 -0000 Received: (qmail 6897 invoked by uid 48); 26 Mar 2010 20:27:00 -0000 Date: Fri, 26 Mar 2010 20:27:00 -0000 Message-ID: <20100326202700.6896.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/43430] Missed vectorization: "stmt not supported: cond_expr" In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "spop at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg02748.txt.bz2 ------- Comment #3 from spop at gcc dot gnu dot org 2010-03-26 20:26 ------- vectorizable_condition has to be cleaned up of this condition: /* We do not handle two different vector types for the condition and the values. */ if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype)) return false; When using: typedef int uint8_t; vsad16_c (void *c, uint8_t * s1, uint8_t * s2, int stride, int h) { int score = 0; int x, y; for (x = 0; x < 16; x++) score += ((s1[x] - s1[x + stride] + s2[x + stride]) >= 0 ? s1[x] + s2[x + stride] : s2[x + stride]); return score; } ncopies is then equal to 1, but then this condition is true: "uint8_t" is a different type than "int" type = 0 ? s1[x] + s2[x + stride] : s2[x + stride]); return score; } and the loop is vectorized. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43430