On Wed, Jul 9, 2014 at 10:25 AM, Ehsan Akhgari <[email protected]> wrote:
> On Wed, Jul 9, 2014 at 1:22 PM, Nico Weber <[email protected]> wrote: > >> On Wed, Jul 9, 2014 at 10:18 AM, Ehsan Akhgari <[email protected]> >> wrote: >> >>> On Wed, Jul 9, 2014 at 12:00 PM, Nico Weber <[email protected]> wrote: >>> >>>> On Wed, Jul 9, 2014 at 8:53 AM, Ehsan Akhgari <[email protected]> >>>> wrote: >>>> >>>>> That's OK, the main intention behind this patch is to unbreak code >>>>> that assumes gcc specific things based on #ifdef __i386__ and friends... >>>>> >>>>> With that in mind, does this look good to land? >>>>> >>>> >>>> This patch also removes the #error lines from all the intrinsics >>>> headers. Did you intend that to be part of this patch? It's a good idea, >>>> but the backend actually asserts when they are used, like David said. >>>> >>> >>> Those are actually the changes I had to make to make the tests pass with >>> my patch. These headers currently use the gcc style target dependent >>> macros in order to decide whether or not to #error and we have tests that >>> hit the #error situation (or hit unknown types because we don't include >>> some headers based on these macros if you #include "immintrin.h" for >>> example). If there is a better way to fix these issues, I'd be happy to do >>> that instead. >>> >> >> I think it's a reasonable change (fwiw), but the backend code should >> probably be changed to not assert when using the intrinsics before this >> change goes in. I don't know how involved it is to do this; I don't know if >> LLVM supports a "it's fine to use SSE from intrinsics, but not for any >> other codegen" mode. >> > > Do you mind pointing me to the code in the backend for this please? I'd > be happy to take a stab at it. > I don't know where it is (David might know), but you could just compile a short sample program calling an avx2 intrinsic without -mavx2 and look at the stack of the assertion :-)
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
