[llvm] 4351787 - AMDGPU: Fix redundant condition

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 02:08:06 PDT 2024


Author: Matt Arsenault
Date: 2024-05-22T11:08:00+02:00
New Revision: 4351787fb650da6d1bfb8d6e58753c90dcd4c418

URL: https://github.com/llvm/llvm-project/commit/4351787fb650da6d1bfb8d6e58753c90dcd4c418
DIFF: https://github.com/llvm/llvm-project/commit/4351787fb650da6d1bfb8d6e58753c90dcd4c418.diff

LOG: AMDGPU: Fix redundant condition

Fixes #93003

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 45a16a14996ee..7fe6c2d0db8f5 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -7593,8 +7593,7 @@ static SDValue constructRetValue(SelectionDAG &DAG, MachineSDNode *Result,
                           ? (ReqRetNumElts + 1) / 2
                           : ReqRetNumElts;
 
-  int MaskPopDwords = (!IsD16 || (IsD16 && Unpacked)) ?
-    DMaskPop : (DMaskPop + 1) / 2;
+  int MaskPopDwords = (!IsD16 || Unpacked) ? DMaskPop : (DMaskPop + 1) / 2;
 
   MVT DataDwordVT = NumDataDwords == 1 ?
     MVT::i32 : MVT::getVectorVT(MVT::i32, NumDataDwords);


        


More information about the llvm-commits mailing list