Skip to content

Commit ed39cb0

Browse files
authored
Fix coverity issues (#4967)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 9357902 commit ed39cb0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/Analysis/AxisInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ class ShLIOpAxisInfoVisitor final : public BinaryOpVisitorImpl<arith::ShLIOp> {
895895
lhsDivisibility = 1;
896896
}
897897
auto numBits = log2Int(lhsDivisibility);
898-
return multiplyDivisor(lhsDivisibility, 1 << shift);
898+
return multiplyDivisor(lhsDivisibility, 1ll << shift);
899899
}
900900

901901
int64_t getConstancy(arith::ShLIOp op, const AxisInfo &lhs,

lib/Conversion/TritonGPUToLLVM/ScanOpToLLVM.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void warpScan(SmallVector<SmallVector<Value>> &srcValues,
7676
acc[j] = select(mask, tempAcc[j], acc[j]);
7777
}
7878
}
79-
srcValues[srcIndex] = acc;
79+
srcValues[srcIndex] = std::move(acc);
8080
}
8181
}
8282

@@ -128,8 +128,8 @@ static void AddPartialReduce(SmallVector<SmallVector<Value>> &srcValues,
128128
ConversionPatternRewriter &rewriter,
129129
const TargetInfoBase &targetInfo,
130130
ScanLoweringHelper &helper,
131-
SmallVector<Value> smemBases,
132-
SmallVector<Type> smemTypes, Value warpId,
131+
ArrayRef<Value> smemBases,
132+
ArrayRef<Type> smemTypes, Value warpId,
133133
Value laneIdAxis, Value parallelLaneId) {
134134
Location loc = helper.getLoc();
135135
unsigned numParallelLane = helper.getNonAxisNumThreadsPerCTA();
@@ -224,7 +224,7 @@ static void AddPartialReduce(SmallVector<SmallVector<Value>> &srcValues,
224224
srcValues[srcIndex - i * elementStride][j]);
225225
}
226226
}
227-
srcValues[srcIndex - i * elementStride] = laneValue;
227+
srcValues[srcIndex - i * elementStride] = std::move(laneValue);
228228
}
229229
// For the next chunk start back from the value containing the
230230
// accumulated value of all the warps.
@@ -303,7 +303,7 @@ static void AddPartialReduceOneWarp(SmallVector<SmallVector<Value>> &srcValues,
303303
srcValues[srcIndex - i * elementStride][j], laneValue[j]);
304304
}
305305
}
306-
srcValues[srcIndex - i * elementStride] = laneValue;
306+
srcValues[srcIndex - i * elementStride] = std::move(laneValue);
307307
}
308308
// For the next chunk start back from the value containing the
309309
// accumulated value of all the warps.

0 commit comments

Comments
 (0)