Hi,<div><br></div><div>The issue of builds with AVX failing on Mac OS has already come up during the summer (<a href="http://goo.gl/62d28" target="_blank">http://goo.gl/62d28</a>), but I have not found any conclusion on what the general state of AVX on Mac is. To me it seems that compiling with gcc-4.x (from Macports) doesn&#39;t work because the assembler doesn&#39;t recognize vax instructions.</div>

<div><br></div><div>At the same time, the Apple clang 3.0 crashes with a back-end error when compiling with GMX_ACCELERATION=AVX_256:</div><div><br></div><div>[  0%] Building C object src/gmxlib/CMakeFiles/gmx.dir/3dview.c.o</div>

<div>fatal error: error in backend: Cannot select: 0x7fdf09385410: f32 = fsqrt 0x7fdf09388210 [ORD=321] [ID=34]</div><div>  0x7fdf09388210: f32 = fadd 0x7fdf09389e10, 0x7fdf0938c510 [ORD=320] [ID=32]</div><div>    0x7fdf09389e10: f32 = fadd 0x7fdf09385b10, 0x7fdf0938a310 [ORD=318] [ID=30]</div>

<div>      0x7fdf09385b10: f32 = fmul 0x7fdf0938a510, 0x7fdf0938a510 [ORD=316] [ID=28]</div><div>        0x7fdf0938a510: f32,ch = load 0x10a984a38, 0x7fdf09385710, 0x7fdf09386610&lt;LD4[%1]&gt; [ORD=311] [ID=23]</div><div>

          0x7fdf09385710: i64 = add 0x7fdf09389110, 0x7fdf09388310 [ORD=310] [ID=19]</div><div>            0x7fdf09389110: i64,ch = CopyFromReg 0x10a984a38, 0x7fdf0938c810 [ORD=310] [ID=15]</div><div>              0x7fdf0938c810: i64 = Register %vreg114 [ORD=310] [ID=1]</div>

<div>            0x7fdf09388310: i64 = Constant&lt;40&gt; [ORD=310] [ID=2]</div><div>          0x7fdf09386610: i64 = undef [ORD=311] [ID=3]</div><div>[...]</div><div><br></div><div>clang 3.1 (from Macports) seems to work fine, though.</div>

<div><br></div><div>This issue might cause a lot of headache for Mac OS users which tend to upgrade often to new hardware and thus often have AVX support. Therefore, I suggest that we try to come up with a reasonable solution so to avoid that people end up with cryptic error messages. We could blacklist in the CMake AVX code-path the bad compilers, but we&#39;d need to identify which ones are certainly broken with AVX. To me it seems that clang &lt;=v3.0 is  one of these, but the gcc issues are probably particular to the Macports installation.</div>

<div><br></div><div>Cheers,</div><div>--<br>Szilárd<br>
<br>
</div>