[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread hjl dot tools at gmail dot com
--- Comment #8 from hjl dot tools at gmail dot com 2010-02-25 19:25 --- (In reply to comment #6) > A blind guess: > > Index: i386.c > === > --- i386.c (revision 157069) > +++ i386.c (working copy) > @@ -29144,8 +2

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread ubizjak at gmail dot com
--- Comment #7 from ubizjak at gmail dot com 2010-02-25 19:02 --- (In reply to comment #6) > H.J., can you please try this patch? The patch generates this sequence, that looks OK to me: movl$4, i+16(%rip) movl$5, i+20(%rip) movl$6, i+24(%rip)

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread ubizjak at gmail dot com
--- Comment #6 from ubizjak at gmail dot com 2010-02-25 19:01 --- A blind guess: Index: i386.c === --- i386.c (revision 157069) +++ i386.c (working copy) @@ -29144,8 +29144,8 @@ expand_vec_perm_blend (struct expan

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread hjl dot tools at gmail dot com
--- Comment #5 from hjl dot tools at gmail dot com 2010-02-25 15:30 --- (In reply to comment #4) > I think that this code: > > i[0].s[0] = 0; > i[0].s[1] = 1; > i[0].s[2] = 2; > i[0].s[3] = 3; > i[0].s[4] = 4; > i[0].s[5] = 5; > i[0].s[6] = 6; > i[0].s[7] = 7; > > is al

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread ubizjak at gmail dot com
--- Comment #4 from ubizjak at gmail dot com 2010-02-25 15:10 --- I think that this code: i[0].s[0] = 0; i[0].s[1] = 1; i[0].s[2] = 2; i[0].s[3] = 3; i[0].s[4] = 4; i[0].s[5] = 5; i[0].s[6] = 6; i[0].s[7] = 7; is also wrong. You have i[1].s[4]. -- http://gcc.gnu.or

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread hjl dot tools at gmail dot com
--- Comment #3 from hjl dot tools at gmail dot com 2010-02-25 15:06 --- We expand D.3242_4 = __builtin_ia32_vec_perm_v4si (D.3241_3, D.3240_2, { 4, 1, 2, 3 }); into (insn 27 24 28 3 x.i:22 (set (subreg:V8HI (reg:V4SI 75) 0) (vec_merge:V8HI (subreg:V8HI (reg:V4SI 75) 0)

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread hjl dot tools at gmail dot com
--- Comment #2 from hjl dot tools at gmail dot com 2010-02-25 14:55 --- This code: 0x004004f8 <+84>:vpxor %xmm0,%xmm0,%xmm0 0x004004fc <+88>:vpblendw $0x3,%xmm0,%xmm0,%xmm0 ^ 0x

[Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with AVX

2010-02-25 Thread hjl dot tools at gmail dot com
--- Comment #1 from hjl dot tools at gmail dot com 2010-02-25 14:53 --- Starting program: /export/build/gnu/gcc-avx/build-x86_64-linux/prev-gcc/a.out Breakpoint 1, 0x003b55c33da0 in abort () from /lib64/libc.so.6 (gdb) f 1 #1 0x00400552 in main () at /tmp/x.c:29 29