[PATCH] D14748: bmiintrin.h: Allow using the tzcnt intrinsics for non-BMI targets

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 17 11:32:00 PST 2015


craig.topper added a subscriber: craig.topper.
craig.topper added a comment.

The summary of why this is ok is slightly misleading. 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





More information about the cfe-commits mailing list