[llvm] 5f3a807 - [PPC] Fix dead store value clang static analyzer warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 08:28:33 PST 2020


Author: Simon Pilgrim
Date: 2020-11-17T16:27:45Z
New Revision: 5f3a8074a431ad68815ccb957e319c3db5bf2d2d

URL: https://github.com/llvm/llvm-project/commit/5f3a8074a431ad68815ccb957e319c3db5bf2d2d
DIFF: https://github.com/llvm/llvm-project/commit/5f3a8074a431ad68815ccb957e319c3db5bf2d2d.diff

LOG: [PPC] Fix dead store value clang static analyzer warning. NFCI.

Simplify the SplatBits 2-byte -> 4-byte 'splat'.

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 2a77d53a78177..d6841fbe8f77d 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -9326,7 +9326,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
   // make a 4-byte splat element. For example: 2-byte splat of 0xABAB can be
   // turned into a 4-byte splat of 0xABABABAB.
   if (Subtarget.hasPrefixInstrs() && SplatSize == 2)
-    return getCanonicalConstSplat((SplatBits |= SplatBits << 16), SplatSize * 2,
+    return getCanonicalConstSplat(SplatBits | (SplatBits << 16), SplatSize * 2,
                                   Op.getValueType(), DAG, dl);
 
   if (Subtarget.hasPrefixInstrs() && SplatSize == 4)


        


More information about the llvm-commits mailing list