In general, count-zeros instructions are undefined for a zero input value.
However the X86 TZCNT and LZCNT instructions do return the bit-width on a
zero input, so make Clang tell LLVM so.
One quirk is that these instructions aren't necessarily both defined, so
also create a separate predicate so we can do the right thing for all CPUs.
--paulr

Attachment: ctz-clz.diff
Description: ctz-clz.diff

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to