[clang] [CIR] Add support for __SVCount (PR #245456)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 08:57:37 PST 2026
================
@@ -2793,8 +2795,9 @@ mlir::LogicalResult CIRToLLVMLoadOpLowering::matchAndRewrite(
return emitTypeConversionError(op, op.getType());
mlir::LLVM::AtomicOrdering ordering = getLLVMMemOrder(op.getMemOrder());
std::optional<size_t> opAlign = op.getAlignment();
- unsigned alignment = (unsigned)opAlign.value_or(
- getMemoryFallbackAlignment(op, op.getType(), llvmTy, dataLayout));
+ unsigned alignment = opAlign ? *opAlign
+ : getMemoryFallbackAlignment(op, op.getType(),
+ llvmTy, dataLayout);
----------------
erichkeane wrote:
Yeah, isn't this just the .value_or you removed? Or is there something subtle we're missing?
https://github.com/llvm/llvm-project/pull/245456
More information about the cfe-commits
mailing list