[PATCH][X86] __builtin_ctz/clz sometimed defined for zero input
Paul_Robinson at playstation.sony.com
Thu Oct 23 16:40:20 PDT 2014
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3726 bytes
More information about the cfe-commits