arsenm wrote:

I'd view assertively stating its undefined behavior as a move away from the 
status quo.  For `__builtin_clz`, GCC states `the result is undefined`. Clang 
appears to not have separate documentation for that exact spelling. It does 
have documentation for `__builtin_clzg`, which has the undefined behavior 
phrasing. 

> We don't currently have a definition of what it means to "use" a value in a 
> way that would cause undefined behavior with poison.

Which means stating it produces undefined behavior less accurate?

> If you have some plan to use this notion of "undefined value" for something 
> other than ctlz/cttz,

There are a handful of other intrinsics which are documented as returning 
`freeze poison` 

https://github.com/llvm/llvm-project/pull/131995
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to