[PATCH] D111968: [TTI] Add OperandValueProperties::OP_NegatedPowerOf2 enum
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 06:20:35 PDT 2022
mstorsjo added inline comments.
================
Comment at: llvm/lib/Analysis/TargetTransformInfo.cpp:734
+ else if (CI->getValue().isNegatedPowerOf2())
+ OpProps = OP_NegatedPowerOf2;
return {OK_UniformConstantValue, OpProps};
----------------
GCC warns about this:
```
../lib/Analysis/TargetTransformInfo.cpp: In static member function ‘static llvm::TargetTransformInfo::OperandValueInfo llvm::TargetTransformInfo::getOperandInfo(const llvm::Value*)’:
../lib/Analysis/TargetTransformInfo.cpp:730:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
730 | if (const auto *CI = dyn_cast<ConstantInt>(V))
| ^
../lib/Analysis/TargetTransformInfo.cpp:753:10: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
753 | if (auto *CI = dyn_cast<ConstantInt>(Splat))
| ^
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111968/new/
https://reviews.llvm.org/D111968
More information about the llvm-commits
mailing list