[llvm] b2c2fef - [X86] Fix -Wunused-function in X86ISelLowering.cpp (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 03:57:15 PDT 2024


Author: Jie Fu
Date: 2024-05-06T18:56:34+08:00
New Revision: b2c2fef5fa5a000629c22be4955641e1ab0ca491

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

LOG: [X86] Fix -Wunused-function in X86ISelLowering.cpp (NFC)

llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:3582:13:
error: unused function 'isBlendOrUndef' [-Werror,-Wunused-function]
static bool isBlendOrUndef(ArrayRef<int> Mask) {
            ^
1 error generated.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 5cc1e81a5cfd42..4638f7b70358b8 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -3579,7 +3579,7 @@ static bool isUndefOrZeroOrInRange(ArrayRef<int> Mask, int Low, int Hi) {
 
 /// Return true if every element in Mask, is an in-place blend/select mask or is
 /// undef.
-static bool isBlendOrUndef(ArrayRef<int> Mask) {
+LLVM_ATTRIBUTE_UNUSED static bool isBlendOrUndef(ArrayRef<int> Mask) {
   unsigned NumElts = Mask.size();
   for (auto [I, M] : enumerate(Mask))
     if (!isUndefOrEqual(M, I) && !isUndefOrEqual(M, I + NumElts))


        


More information about the llvm-commits mailing list