Skip to content

Commit 2a91932

Browse files
committed
Remove optional from getBarrier0IntrinsicID
1 parent 6e668ae commit 2a91932

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,8 @@ static unsigned getUnidirectionalFenceProxyID(NVVM::ProxyKind fromProxy,
291291
llvm_unreachable("Unsupported proxy kinds");
292292
}
293293

294-
static unsigned getBarrier0IntrinsicID(std::optional<NVVM::Barrier0Pred> pred) {
295-
if (!pred)
296-
return llvm::Intrinsic::nvvm_barrier_cta_sync_aligned_all;
297-
switch (*pred) {
294+
static unsigned getBarrier0IntrinsicID(NVVM::Barrier0Pred pred) {
295+
switch (pred) {
298296
case NVVM::Barrier0Pred::AND:
299297
return llvm::Intrinsic::nvvm_barrier0_and;
300298
case NVVM::Barrier0Pred::OR:

0 commit comments

Comments
 (0)