================
@@ -197,6 +197,12 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
mlir::Value src, mlir::Value len) {
return cir::MemCpyOp::create(*this, loc, dst, src, len);
}
+
+ cir::MemSetOp createMemSet(mlir::Location loc, mlir::Value dst,
+ mlir::Value val, mlir::Value len) {
+ val = createIntCast(val, cir::IntType::get(getContext(), 32, true));
----------------
erichkeane wrote:
Why does memset take a 32 bit int for the 'value'? I guess libc takes an
'int', but that is for historical reasons, it is intentionally/immediately cast
to 8 bits (unsigned char).
It seems to me that we should model memset to be its semantics, not its
signature.
https://github.com/llvm/llvm-project/pull/178806
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits