On Tue, Nov 17, 2015 at 11:32 AM, Craig Topper <craig.top...@gmail.com>
wrote:

> craig.topper added a subscriber: craig.topper.
> craig.topper added a comment.
>
> The summary of why this is ok is slightly misleading.


I read this as reason why programs might try to use this, not why this
change here is correct. (This change is ok as it has an explicit 0 check as
you say, so it'll only be efficient once you target machines with BMI)


> The backend won't try to encode the TZCNT instruction when the BMI feature
> is not enabled. Notice this just maps the to the generic non-x86 specific
> __builtin_ctz. The backend will emit a regular BSF instruction if BMI is
> not supported. There will be a zero check around it unless the backend can
> prove that the input is not 0.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D14748
>
>
>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to