From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31825 invoked by alias); 22 Apr 2007 19:08:29 -0000 Received: (qmail 31786 invoked by uid 48); 22 Apr 2007 19:08:16 -0000 Date: Sun, 22 Apr 2007 19:08:00 -0000 Message-ID: <20070422190816.31785.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/24659] Conversions are not vectorized In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" 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: 2007-04/txt/msg01632.txt.bz2 ------- Comment #10 from ubizjak at gmail dot com 2007-04-22 20:08 ------- float->double and double->float conversions are new vectorized. For a slightly different test: --cut here-- void test_fp (float *a, double *b) { int i; for (i = 0; i < 4; i++) b[i] = (double) a[i]; } void test_int (int *a, double *b) { int i; for (i = 0; i < 4; i++) b[i] = (double) a[i]; } --cut here-- we generate following loops: test_fd: .L2: movaps a(%rax), %xmm0 movhlps %xmm0, %xmm2 cvtps2pd %xmm0, %xmm1 movapd %xmm1, c(%rax,%rax) cvtps2pd %xmm2, %xmm0 movapd %xmm0, c+16(%rax,%rax) addq $16, %rax cmpq $64, %rax jne .L2 test_df: .L8: cvtpd2ps c(%rax,%rax), %xmm0 cvtpd2ps c+16(%rax,%rax), %xmm1 movlhps %xmm1, %xmm0 movaps %xmm0, a(%rax) addq $16, %rax cmpq $64, %rax jne .L8 test_int (no vectorization): .L13: cvtsi2sd b(,%rax,4), %xmm0 movsd %xmm0, c(,%rax,8) addq $1, %rax cmpq $16, %rax jne .L13 Note, that we still don't vectorize double->int and int->double conversions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24659