diff options
| author | Jakub Chlanda <jakub@codeplay.com> | 2023-12-18 12:07:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-18 12:07:22 +0100 |
| commit | a34db9bdefe6d60b46f485aa1105ef6c95542e16 (patch) | |
| tree | 48ca0dfc24e843c78cf40d2e000778f43bb6cf89 /llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp | |
| parent | 1faa1cd02d569c1e58303ab4bd9d082aecda2a52 (diff) | |
[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.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp index 0c21382e5c22..f03e6b8915b1 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp @@ -1050,8 +1050,7 @@ bool AMDGPULibCalls::fold_pow(FPMathOperator *FPOp, IRBuilder<> &B, CF->isNegative(); } else { needlog = true; - needcopysign = needabs = FInfo.getId() != AMDGPULibFunc::EI_POWR && - (!CF || CF->isNegative()); + needcopysign = needabs = FInfo.getId() != AMDGPULibFunc::EI_POWR; } } else { ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(opr0); |
