On Thu, Aug 04, 2011 at 01:28:17PM +0400, Kirill Yukhin wrote: > During last few months I was working on AVX2 support for GCC. > > Here is a patch which conforms (hopefully) to Spec which can be found at [1] > > I am attaching following files: > - avx2.gcc.patch.tar.bz2. Compressed changes to GCC
Please be careful with the dejagnu feature tests: +# Return 1 if avx2 instructions can be compiled. +proc check_effective_target_avx2 { } { + return [check_no_compiler_messages avx2 object { + void _mm256_andnot_si256 (void) + { + long long x __attribute__ ((__vector_size__ (32))); + x = __builtin_ia32_andnotsi256 (x,x); + } + } "-O0 -mavx2" ] +} is using uninitialized variable. Much better to write it e.g. as typedef long long __v4di __attribute__ ((__vector_size__ (32))); __v4di mm256_andnot_si256 (__v4di __X, __v4di __Y) { return __builtin_ia32_andnotsi256 (__X, __Y); } where no uninitialized vars are used, and the compiler can't really optimize it away, nor attempt to simplify it (x & ~x is always 0, right?). > - opt64.tmp.gcc.patch. Since we have exceeded number of possible keys > in ix86_isa_flags this temporary patch allows AVX2 changes to work. I don't think it is a good idea to bump the 31 check in the conditions handling, that should be done only if the variable type is known to be 64-bit. Jakub