[PATCH] D28928: [ValueTracking] Implement SignBitMustBeZero correctly for sqrt.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 18:16:26 PST 2017

arsenm added inline comments.

Comment at: llvm/lib/Analysis/ValueTracking.cpp:2681-2683
+      if (ConstantInt *Exponent = dyn_cast<ConstantInt>(I->getOperand(1))) {
         // powi(x,n) is non-negative if n is even.
+        if (Exponent->getBitWidth() <= 64 && Exponent->getSExtValue() % 2u == 0)
jlebar wrote:
> arsenm wrote:
> > Unrelated changes
> I introduced the variable "CI" above, and I did not want to shadow it here.
> I could split out this variable rename into a separate patch if you really think that's necessary?
OK, that's fine


More information about the llvm-commits mailing list