[llvm] 6398b68 - AMDGPU: Fix variables only used in asserts
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 15:55:53 PDT 2023
Author: Matt Arsenault
Date: 2023-07-21T18:55:42-04:00
New Revision: 6398b687c516d27778a570635d6f2fe1c145cb18
URL: https://github.com/llvm/llvm-project/commit/6398b687c516d27778a570635d6f2fe1c145cb18
DIFF: https://github.com/llvm/llvm-project/commit/6398b687c516d27778a570635d6f2fe1c145cb18.diff
LOG: AMDGPU: Fix variables only used in asserts
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
index b56e34c63ace3c..5c0b3e7b50f037 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
@@ -902,8 +902,7 @@ Value *AMDGPUCodeGenPrepareImpl::optimizeWithRsq(
if (!CLHS)
return nullptr;
- Type *Ty = Den->getType();
- assert(Ty->isFloatTy());
+ assert(Den->getType()->isFloatTy());
bool IsNegative = false;
@@ -940,8 +939,7 @@ AMDGPUCodeGenPrepareImpl::optimizeWithRcp(IRBuilder<> &Builder, Value *Num,
// rcp_f16 is accurate to 0.51 ulp.
// rcp_f32 is accurate for !fpmath >= 1.0ulp and denormals are flushed.
// rcp_f64 is never accurate.
- Type *Ty = Den->getType();
- assert(Ty->isFloatTy());
+ assert(Den->getType()->isFloatTy());
if (const ConstantFP *CLHS = dyn_cast<ConstantFP>(Num)) {
bool IsNegative = false;
More information about the llvm-commits
mailing list