[llvm] 9dceb32 - [NFC][CVP] processSDiv(): pacify gcc compilers
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 09:42:13 PDT 2020
Author: Roman Lebedev
Date: 2020-07-18T19:41:43+03:00
New Revision: 9dceb32f300d021bf6ace6d27ffaf670799e2e8d
URL: https://github.com/llvm/llvm-project/commit/9dceb32f300d021bf6ace6d27ffaf670799e2e8d
DIFF: https://github.com/llvm/llvm-project/commit/9dceb32f300d021bf6ace6d27ffaf670799e2e8d.diff
LOG: [NFC][CVP] processSDiv(): pacify gcc compilers
Added:
Modified:
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
index fb7a005708e5..48968166c605 100644
--- a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
+++ b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
@@ -697,14 +697,14 @@ static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) {
struct Operand {
Value *V;
- Domain Domain;
+ Domain D;
};
std::array<Operand, 2> Ops;
- for (const auto &I : zip(Ops, SDI->operands())) {
+ for (const auto I : zip(Ops, SDI->operands())) {
Operand &Op = std::get<0>(I);
Op.V = std::get<1>(I);
- Op.Domain = getDomain(Op.V);
- if (Op.Domain == Domain::Unknown)
+ Op.D = getDomain(Op.V);
+ if (Op.D == Domain::Unknown)
return false;
}
@@ -713,7 +713,7 @@ static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) {
// We need operands to be non-negative, so negate each one that isn't.
for (Operand &Op : Ops) {
- if (Op.Domain == Domain::NonNegative)
+ if (Op.D == Domain::NonNegative)
continue;
auto *BO =
BinaryOperator::CreateNeg(Op.V, Op.V->getName() + ".nonneg", SDI);
@@ -729,7 +729,7 @@ static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) {
Value *Res = UDiv;
// If the operands had two
diff erent domains, we need to negate the result.
- if (Ops[0].Domain != Ops[1].Domain)
+ if (Ops[0].D != Ops[1].D)
Res = BinaryOperator::CreateNeg(Res, Res->getName() + ".neg", SDI);
SDI->replaceAllUsesWith(Res);
More information about the llvm-commits
mailing list