[llvm] 6d23f29 - [examples] Fix llvm.memset prototype in BrainF example.
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Sun May 10 14:21:09 PDT 2020
Author: Ricky Zhou
Date: 2020-05-10T17:20:56-04:00
New Revision: 6d23f2985270acb6907ad61f609a245bf844d472
URL: https://github.com/llvm/llvm-project/commit/6d23f2985270acb6907ad61f609a245bf844d472
DIFF: https://github.com/llvm/llvm-project/commit/6d23f2985270acb6907ad61f609a245bf844d472.diff
LOG: [examples] Fix llvm.memset prototype in BrainF example.
Commit 1e68724d24ba38de7c7cdb2e1939d78c8b37cc0d removed the alignment
argument from the memset intrinsic. Update the BrainF example to match.
Reviewed By: jyknight
Differential Revision: https://reviews.llvm.org/D79601
Added:
Modified:
llvm/examples/BrainF/BrainF.cpp
Removed:
################################################################################
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp
index eef64d3df2df..067dad137658 100644
--- a/llvm/examples/BrainF/BrainF.cpp
+++ b/llvm/examples/BrainF/BrainF.cpp
@@ -66,7 +66,7 @@ void BrainF::header(LLVMContext& C) {
//Function prototypes
- //declare void @llvm.memset.p0i8.i32(i8 *, i8, i32, i32, i1)
+ //declare void @llvm.memset.p0i8.i32(i8 *, i8, i32, i1)
Type *Tys[] = { Type::getInt8PtrTy(C), Type::getInt32Ty(C) };
Function *memset_func = Intrinsic::getDeclaration(module, Intrinsic::memset,
Tys);
@@ -98,13 +98,12 @@ void BrainF::header(LLVMContext& C) {
nullptr, "arr");
BB->getInstList().push_back(cast<Instruction>(ptr_arr));
- //call void @llvm.memset.p0i8.i32(i8 *%arr, i8 0, i32 %d, i32 1, i1 0)
+ //call void @llvm.memset.p0i8.i32(i8 *%arr, i8 0, i32 %d, i1 0)
{
Value *memset_params[] = {
ptr_arr,
ConstantInt::get(C, APInt(8, 0)),
val_mem,
- ConstantInt::get(C, APInt(32, 1)),
ConstantInt::get(C, APInt(1, 0))
};
More information about the llvm-commits
mailing list