[clang] [CIR] Add noundef to memchr declaration and call sites (PR #191457)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 10 15:20:25 PDT 2026
================
@@ -4688,10 +4670,25 @@ mlir::LogicalResult CIRToLLVMMemChrOpLowering::matchAndRewrite(
/*isVarArg=*/false);
llvm::StringRef fnName = "memchr";
createLLVMFuncOpIfNotExist(rewriter, op, fnName, fnTy);
- rewriter.replaceOpWithNewOp<mlir::LLVM::CallOp>(
+
+ mlir::Builder b(rewriter.getContext());
+ auto noundefAttr = b.getNamedAttr("llvm.noundef", b.getUnitAttr());
----------------
andykaylor wrote:
Don't use `auto` in most of these cases.
https://github.com/llvm/llvm-project/pull/191457
More information about the cfe-commits
mailing list