John Regehr via llvm-dev
2016-Jan-05 16:02 UTC
[llvm-dev] quick question about bit analyses
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
John Regehr via llvm-dev
2016-Jan-06 09:10 UTC
[llvm-dev] quick question about bit analyses
Sorry-- looks like I was seeing a bug in my code. John On 1/5/16 5:02 PM, John Regehr via llvm-dev wrote:> 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 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev