aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/DependenceAnalysis.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-01-13 16:28:44 -0800
committerFangrui Song <i@maskray.me>2023-01-13 16:28:44 -0800
commitcfdba8b7400746250daf9f9557d3dfca3dadf7c6 (patch)
tree086b7f7897c4213022613efcce9f014358651c5e /llvm/lib/Analysis/DependenceAnalysis.cpp
parent217fd59cc5849f1afdbb8a74807a80b23f2da227 (diff)
downloadllvm-cfdba8b7400746250daf9f9557d3dfca3dadf7c6.zip
llvm-cfdba8b7400746250daf9f9557d3dfca3dadf7c6.tar.gz
llvm-cfdba8b7400746250daf9f9557d3dfca3dadf7c6.tar.bz2
Fix some -Wconstant-conversion warnings for future Clang (D139114)
Diffstat (limited to 'llvm/lib/Analysis/DependenceAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/DependenceAnalysis.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index 92d29a5..1bce9aa 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -1379,8 +1379,8 @@ bool DependenceInfo::weakCrossingSIVtest(
LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
NewConstraint.setLine(Coeff, Coeff, Delta, CurLoop);
if (Delta->isZero()) {
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::LT;
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
++WeakCrossingSIVsuccesses;
if (!Result.DV[Level].Direction) {
++WeakCrossingSIVindependence;
@@ -1439,8 +1439,8 @@ bool DependenceInfo::weakCrossingSIVtest(
}
if (isKnownPredicate(CmpInst::ICMP_EQ, Delta, ML)) {
// i = i' = UB
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::LT;
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
++WeakCrossingSIVsuccesses;
if (!Result.DV[Level].Direction) {
++WeakCrossingSIVindependence;
@@ -1473,7 +1473,7 @@ bool DependenceInfo::weakCrossingSIVtest(
LLVM_DEBUG(dbgs() << "\t Remainder = " << Remainder << "\n");
if (Remainder != 0) {
// Equal direction isn't possible
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::EQ);
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::EQ;
++WeakCrossingSIVsuccesses;
}
return false;
@@ -2557,7 +2557,7 @@ bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst,
LLVM_DEBUG(dbgs() << "\tRemainder = " << Remainder << "\n");
if (Remainder != 0) {
unsigned Level = mapSrcLoop(CurLoop);
- Result.DV[Level - 1].Direction &= unsigned(~Dependence::DVEntry::EQ);
+ Result.DV[Level - 1].Direction &= ~Dependence::DVEntry::EQ;
Improved = true;
}
}