Skip to content

Commit 5aa7d34

Browse files
committed
Address reviews
1 parent 7af8bc5 commit 5aa7d34

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,8 @@ LogicalResult ModuleTranslation::convertArgAndResultAttrs(
17641764
// Convert the argument attributes.
17651765
if (ArrayAttr argAttrsArray = attrsOp.getArgAttrsAttr()) {
17661766
unsigned argAttrIdx = 0;
1767-
llvm::DenseSet<unsigned> immArgPositionsSet(immArgPositions.begin(),
1768-
immArgPositions.end());
1767+
llvm::SmallDenseSet<unsigned> immArgPositionsSet(immArgPositions.begin(),
1768+
immArgPositions.end());
17691769
for (unsigned argIdx : llvm::seq<unsigned>(call->arg_size())) {
17701770
if (argAttrIdx >= argAttrsArray.size())
17711771
break;

mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,10 @@ llvm.func @memcpy_test(%arg0: i32, %arg2: !llvm.ptr, %arg3: !llvm.ptr) {
607607
"llvm.intr.memcpy.inline"(%arg2, %arg3) <{arg_attrs = [{llvm.align = 4 : i64}, {}], isVolatile = true, len = 10 : i32}> : (!llvm.ptr, !llvm.ptr) -> ()
608608
// CHECK: call void @llvm.memcpy.inline.p0.p0.i64(ptr %{{.*}}, ptr %{{.*}}, i64 10, i1 true
609609
"llvm.intr.memcpy.inline"(%arg2, %arg3) <{isVolatile = true, len = 10 : i64}> : (!llvm.ptr, !llvm.ptr) -> ()
610+
611+
// Verify that trailing empty argument attribute dictionaries can be omitted.
612+
// CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %{{.*}}, ptr align 8 %{{.*}}, i32 %{{.*}}, i1 false
613+
"llvm.intr.memcpy"(%arg2, %arg3, %arg0) <{arg_attrs = [{llvm.align = 4 : i64}, {llvm.align = 8 : i64}], isVolatile = false}> : (!llvm.ptr, !llvm.ptr, i32) -> ()
610614
llvm.return
611615
}
612616

0 commit comments

Comments
 (0)