[llvm] 9008d0a - Fix -Warray-parameter warning

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 9 10:05:05 PDT 2022


Author: David Blaikie
Date: 2022-07-09T17:04:01Z
New Revision: 9008d0a38e42027f4a01430358ccd38d32bc86d5

URL: https://github.com/llvm/llvm-project/commit/9008d0a38e42027f4a01430358ccd38d32bc86d5
DIFF: https://github.com/llvm/llvm-project/commit/9008d0a38e42027f4a01430358ccd38d32bc86d5.diff

LOG: Fix -Warray-parameter warning

Remove the bound in the definition, since it's not guaranteed/could
provide a false sense of security (I'd be inclined to go further and
change this to a pointer parameter, since that's what it really is - but
figured I'd preserve some of the author's intent here)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
index bf52f7830ad7..5199a37a0519 100644
--- a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
@@ -1623,7 +1623,7 @@ static SDValue ReorganizeVector(SelectionDAG &DAG, SDValue VectorEntry,
                             NewBldVec);
 }
 
-SDValue R600TargetLowering::OptimizeSwizzle(SDValue BuildVector, SDValue Swz[4],
+SDValue R600TargetLowering::OptimizeSwizzle(SDValue BuildVector, SDValue Swz[],
                                             SelectionDAG &DAG,
                                             const SDLoc &DL) const {
   // Old -> New swizzle values


        


More information about the llvm-commits mailing list