Skip to content

Commit

Permalink
Fix coverity issues (#4967)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev authored Oct 22, 2024
1 parent 9357902 commit ed39cb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Analysis/AxisInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ class ShLIOpAxisInfoVisitor final : public BinaryOpVisitorImpl<arith::ShLIOp> {
lhsDivisibility = 1;
}
auto numBits = log2Int(lhsDivisibility);
return multiplyDivisor(lhsDivisibility, 1 << shift);
return multiplyDivisor(lhsDivisibility, 1ll << shift);
}

int64_t getConstancy(arith::ShLIOp op, const AxisInfo &lhs,
Expand Down
10 changes: 5 additions & 5 deletions lib/Conversion/TritonGPUToLLVM/ScanOpToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static void warpScan(SmallVector<SmallVector<Value>> &srcValues,
acc[j] = select(mask, tempAcc[j], acc[j]);
}
}
srcValues[srcIndex] = acc;
srcValues[srcIndex] = std::move(acc);
}
}

Expand Down Expand Up @@ -128,8 +128,8 @@ static void AddPartialReduce(SmallVector<SmallVector<Value>> &srcValues,
ConversionPatternRewriter &rewriter,
const TargetInfoBase &targetInfo,
ScanLoweringHelper &helper,
SmallVector<Value> smemBases,
SmallVector<Type> smemTypes, Value warpId,
ArrayRef<Value> smemBases,
ArrayRef<Type> smemTypes, Value warpId,
Value laneIdAxis, Value parallelLaneId) {
Location loc = helper.getLoc();
unsigned numParallelLane = helper.getNonAxisNumThreadsPerCTA();
Expand Down Expand Up @@ -224,7 +224,7 @@ static void AddPartialReduce(SmallVector<SmallVector<Value>> &srcValues,
srcValues[srcIndex - i * elementStride][j]);
}
}
srcValues[srcIndex - i * elementStride] = laneValue;
srcValues[srcIndex - i * elementStride] = std::move(laneValue);
}
// For the next chunk start back from the value containing the
// accumulated value of all the warps.
Expand Down Expand Up @@ -303,7 +303,7 @@ static void AddPartialReduceOneWarp(SmallVector<SmallVector<Value>> &srcValues,
srcValues[srcIndex - i * elementStride][j], laneValue[j]);
}
}
srcValues[srcIndex - i * elementStride] = laneValue;
srcValues[srcIndex - i * elementStride] = std::move(laneValue);
}
// For the next chunk start back from the value containing the
// accumulated value of all the warps.
Expand Down

0 comments on commit ed39cb0

Please sign in to comment.