Skip to content

Commit 926d628

Browse files
committed
[SPIRV] Fix code quality issues.
1 parent 96a7c9b commit 926d628

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,8 @@ bool SPIRVLegalizerInfo::legalizeIsFPClass(
584584
}
585585

586586
if (FPClassTest PartialCheck = Mask & fcNan) {
587-
auto InfWithQnanBitC = buildSPIRVConstant(IntTy, Inf | QNaNBitMask);
587+
auto InfWithQnanBitC =
588+
buildSPIRVConstant(IntTy, std::move(Inf) | QNaNBitMask);
588589
if (PartialCheck == fcNan) {
589590
// isnan(V) ==> abs(V) u> int(inf)
590591
appendToRes(
@@ -610,7 +611,7 @@ bool SPIRVLegalizerInfo::legalizeIsFPClass(
610611
APInt ExpLSB = ExpMask & ~(ExpMask.shl(1));
611612
auto ExpMinusOne = assignSPIRVTy(
612613
MIRBuilder.buildSub(IntTy, Abs, buildSPIRVConstant(IntTy, ExpLSB)));
613-
APInt MaxExpMinusOne = ExpMask - ExpLSB;
614+
APInt MaxExpMinusOne = std::move(ExpMask) - ExpLSB;
614615
auto NormalRes = assignSPIRVTy(
615616
MIRBuilder.buildICmp(CmpInst::Predicate::ICMP_ULT, DstTy, ExpMinusOne,
616617
buildSPIRVConstant(IntTy, MaxExpMinusOne)));

0 commit comments

Comments
 (0)