[Mlir-commits] [mlir] 96de843 - [mlir][NVVM] Fix default label unreachable warning in `getVoteSyncIntrinsicId` (#134600)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Apr 7 04:13:06 PDT 2025


Author: Jorn Tuyls
Date: 2025-04-07T13:13:02+02:00
New Revision: 96de8435b90e5164da2d38ee34594e86069360e7

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

LOG: [mlir][NVVM] Fix default label unreachable warning in `getVoteSyncIntrinsicId` (#134600)

Fixes the following warning after the changes in
https://github.com/llvm/llvm-project/pull/134309:

```
llvm-project/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp:134:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
  default:
  ^
1 warning generated.
```

Added: 
    

Modified: 
    mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
index beff90237562d..7dfe320cff2ab 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
@@ -131,9 +131,8 @@ static llvm::Intrinsic::ID getVoteSyncIntrinsicId(NVVM::VoteSyncKind kind) {
     return llvm::Intrinsic::nvvm_vote_ballot_sync;
   case NVVM::VoteSyncKind::uni:
     return llvm::Intrinsic::nvvm_vote_uni_sync;
-  default:
-    llvm_unreachable("unsupported vote kind");
   }
+  llvm_unreachable("unsupported vote kind");
 }
 
 /// Return the intrinsic ID associated with ldmatrix for the given paramters.


        


More information about the Mlir-commits mailing list