[PATCH] D28928: [ValueTracking] Implement SignBitMustBeZero correctly for sqrt.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 16:51:46 PST 2017
arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.
LGTM with extra changes dropped
================
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)
----------------
Unrelated changes
https://reviews.llvm.org/D28928
More information about the llvm-commits
mailing list