[PATCH] D99276: [ValueTracking] peek through min/max to find isKnownToBeAPowerOfTwo
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 11:03:48 PDT 2021
spatel added inline comments.
================
Comment at: llvm/include/llvm/IR/PatternMatch.h:1738
// it is the values returned by the select that are being compared.
- Value *TrueVal = SI->getTrueValue();
- Value *FalseVal = SI->getFalseValue();
- Value *LHS = Cmp->getOperand(0);
- Value *RHS = Cmp->getOperand(1);
+ auto *TrueVal = SI->getTrueValue();
+ auto *FalseVal = SI->getFalseValue();
----------------
RKSimon wrote:
> lebedev.ri wrote:
> > Yeah, i think that's fine..
> Really we should be avoiding auto for anything but casts or iterators
So `const_cast` in the caller, or do you see another way to avoid the build errors?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99276/new/
https://reviews.llvm.org/D99276
More information about the llvm-commits
mailing list