rengolin added a comment.

In http://reviews.llvm.org/D14471#287635, @ahatanak wrote:

> I didn't include a test case because I didn't know how to write a test that 
> passes on an aarch64 host and fails on anything else. Do you know of any test 
> cases in trunk that pass or fail depending on which host it is running on?


It's possible to do something with the python config, though I don't know how.

> Wouldn't it break on an aarch64 host? With "-mtune=native", the current code 
> in trunk will get the host cpu name (which I believe is currently always 
> "generic" for aarch64). But if I apply this patch, it will error out because 
> "native" is not a valid cpu name.


That's my point. It shouldn't break.

If you can get the CPU name, return it. If not, return "native". If you're on 
AArch64 and you can't get the CPU name, that's a bug that needs fixing. If it's 
always "generic", that's another piece of code that needs fixing. If whatever 
getCPU function you use doesn't return a valid name, and the name chosen was 
"native", you should return "native".

--renato


http://reviews.llvm.org/D14471



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to