[llvm] 9ccc588 - AMDGPU: Fix not adding to depth in getNegatedExpression
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 04:33:06 PST 2023
Author: Matt Arsenault
Date: 2023-02-15T08:32:58-04:00
New Revision: 9ccc58893be86b3f17e348ba8a9ad90f51a86ed0
URL: https://github.com/llvm/llvm-project/commit/9ccc58893be86b3f17e348ba8a9ad90f51a86ed0
DIFF: https://github.com/llvm/llvm-project/commit/9ccc58893be86b3f17e348ba8a9ad90f51a86ed0.diff
LOG: AMDGPU: Fix not adding to depth in getNegatedExpression
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
index 1b1abc4f39b7..79fbbf5f5a69 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -813,7 +813,7 @@ SDValue AMDGPUTargetLowering::getNegatedExpression(
SDLoc SL(Op);
SDValue NegSrc = getNegatedExpression(Src, DAG, LegalOperations,
- ForCodeSize, Cost, Depth);
+ ForCodeSize, Cost, Depth + 1);
if (NegSrc)
return DAG.getNode(AMDGPUISD::RCP, SL, VT, NegSrc, Op->getFlags());
return SDValue();
More information about the llvm-commits
mailing list