www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - So LDC generates a LLVM icmp for unary not on bool ?

reply user1234 <user1234 12.de> writes:
Unimportant topic but [I've noticed] that it does not seem to use 
BuildNot() which would generate a xor for `i1`. Is there a 
particular reason for that ?

[I've noticed]: https://godbolt.org/z/f5fdvb4a5
May 27 2022
parent Kagamin <spam here.lot> writes:
I suppose it's because bool is checked for truth by comparison to 
zero. Xor wouldn't provide the law of excluded middle this way.
May 31 2022