diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp b/contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp index 10cf0580f8..3c6c444d66 100644 --- a/contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp +++ b/contrib/libs/llvm12/lib/Transforms/Scalar/DivRemPairs.cpp @@ -151,8 +151,8 @@ static DivRemWorklistTy getWorklist(Function &F) { // rare than division. for (auto &RemPair : RemMap) { // Find the matching division instruction from the division map. - auto It = DivMap.find(RemPair.first); - if (It == DivMap.end()) + auto It = DivMap.find(RemPair.first); + if (It == DivMap.end()) continue; // We have a matching pair of div/rem instructions. @@ -160,7 +160,7 @@ static DivRemWorklistTy getWorklist(Function &F) { Instruction *RemInst = RemPair.second; // Place it in the worklist. - Worklist.emplace_back(It->second, RemInst); + Worklist.emplace_back(It->second, RemInst); } return Worklist; @@ -315,14 +315,14 @@ static bool optimizeDivRem(Function &F, const TargetTransformInfo &TTI, // %rem = sub %x, %mul // %rem = undef - undef = undef // If X is not frozen, %rem becomes undef after transformation. // TODO: We need a undef-specific checking function in ValueTracking - if (!isGuaranteedNotToBeUndefOrPoison(X, nullptr, DivInst, &DT)) { + if (!isGuaranteedNotToBeUndefOrPoison(X, nullptr, DivInst, &DT)) { auto *FrX = new FreezeInst(X, X->getName() + ".frozen", DivInst); DivInst->setOperand(0, FrX); Sub->setOperand(0, FrX); } // Same for Y. If X = 1 and Y = (undef | 1), %rem in src is either 1 or 0, // but %rem in tgt can be one of many integer values. - if (!isGuaranteedNotToBeUndefOrPoison(Y, nullptr, DivInst, &DT)) { + if (!isGuaranteedNotToBeUndefOrPoison(Y, nullptr, DivInst, &DT)) { auto *FrY = new FreezeInst(Y, Y->getName() + ".frozen", DivInst); DivInst->setOperand(1, FrY); Mul->setOperand(1, FrY); |