[llvm-dev] quick question about bit analyses

John Regehr via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 5 08:02:11 PST 2016


As expected, in optimized LLVM code, I never see computeKnownBits() 
knowing the value of every bit of a variable.

On the other hand, in optimized LLVM code I do sometimes see i1 values 
where isKnownNonZero(), isKnownNonNegative(), and/or 
isKnownToBeAPowerOfTwo() are true.

My question is whether perhaps these analysis fail to apply to i1 values 
or am I simply seeing missed optimization opportunities?

Thanks,

John


More information about the llvm-dev mailing list