<div dir="ltr">I never used LLVM so I'm looking at the manual right now. It's explained here:<div><br></div><div><div><a href="http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mcpu">http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mcpu</a><br>
</div><div><br></div><div>It autodetects the cpu and optimizes for it.</div><div>As I understand, in order to produce generic code you should pass -mcpu=i686 or -mcpu=x86_64. They can be passed to the ghc via -optlc, e.g. -optlc="-mcpu=x86_64".</div>
<div>I'm going to look more carefully to see what is the best option to pass.</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 27, 2014 at 10:32 PM, Magnus Therning <span dir="ltr"><<a href="mailto:magnus@therning.org" target="_blank">magnus@therning.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Sun, Apr 27, 2014 at 10:16:30PM +0200, Nicola Squartini wrote:<br>
> Is it possible that LLVM automatically optimizes for your<br>
> architecture or triggers the use of some simd that is not present on<br>
> my AMDs?<br>
<br>
</div>I suppose that might be the case.  It is possible to pass options to<br>
specific parts of the compilation process, but I have never looked at<br>
any of this before so help would be very appreciated.<br>
<div class=""><br>
/M<br>
<br>
--<br>
Magnus Therning                      OpenPGP: 0xAB4DFBA4<br>
email: <a href="mailto:magnus@therning.org">magnus@therning.org</a>   jabber: <a href="mailto:magnus@therning.org">magnus@therning.org</a><br>
twitter: magthe               <a href="http://therning.org/magnus" target="_blank">http://therning.org/magnus</a><br>
<br>
</div>Perl is another example of filling a tiny, short-term need, and then<br>
being a real problem in the longer term.<br>
     -- Alan Kay<br>
</blockquote></div><br></div>