[llvm] bc7ca91 - [AMDGPUInstCombine] Avoid use of ConstantExpr::getSExt() (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 02:12:11 PDT 2023
Author: Nikita Popov
Date: 2023-10-02T11:12:04+02:00
New Revision: bc7ca9170f250e2eb6b235ed8555278dbc82e801
URL: https://github.com/llvm/llvm-project/commit/bc7ca9170f250e2eb6b235ed8555278dbc82e801
DIFF: https://github.com/llvm/llvm-project/commit/bc7ca9170f250e2eb6b235ed8555278dbc82e801.diff
LOG: [AMDGPUInstCombine] Avoid use of ConstantExpr::getSExt() (NFC)
Let the IRBuilder handle the constant folding instead.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
index f49945da0da2189..5296415ab4c36da 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
@@ -830,7 +830,7 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
Constant *CCmp = ConstantExpr::getCompare(CCVal, CSrc0, CSrc1);
if (CCmp->isNullValue()) {
return IC.replaceInstUsesWith(
- II, ConstantExpr::getSExt(CCmp, II.getType()));
+ II, IC.Builder.CreateSExt(CCmp, II.getType()));
}
// The result of V_ICMP/V_FCMP assembly instructions (which this
More information about the llvm-commits
mailing list