Skip to content

Commit a34db9b

Browse files
authored
[AMDGPU][NFC] Simplify needcopysign logic (#75176)
This was caught by coverity, reported as: `dead_error_condition`. Since the conditional revolves around `CF`, it is guaranteed to be null in the else clause, hence making the second part of the statement redundant.
1 parent 1faa1cd commit a34db9b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,7 @@ bool AMDGPULibCalls::fold_pow(FPMathOperator *FPOp, IRBuilder<> &B,
10501050
CF->isNegative();
10511051
} else {
10521052
needlog = true;
1053-
needcopysign = needabs = FInfo.getId() != AMDGPULibFunc::EI_POWR &&
1054-
(!CF || CF->isNegative());
1053+
needcopysign = needabs = FInfo.getId() != AMDGPULibFunc::EI_POWR;
10551054
}
10561055
} else {
10571056
ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(opr0);

0 commit comments

Comments
 (0)