Skip to content

Commit 8e8f195

Browse files
authored
[mlir][amd] fix LLVM::InsertValueOp::create failure to disambiguate (#150605)
fixes #149879 (comment) Note this happens because ADL can't disambiguate between `mlir::DenseI64ArrayAttr` and `llvm::ArrayRef<int64_t>` **for the value 0** which I guess is equal to nullptr on some (most?) systems. Note, this only occurs with the value 0.
1 parent a850912 commit 8e8f195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ struct FatRawBufferCastLowering
232232
Value result = MemRefDescriptor::poison(
233233
rewriter, loc,
234234
getTypeConverter()->convertType(op.getResult().getType()));
235-
result = LLVM::InsertValueOp::create(rewriter, loc, result, fatPtr,
236-
kAllocatedPtrPosInMemRefDescriptor);
235+
SmallVector<int64_t> pos{kAllocatedPtrPosInMemRefDescriptor};
236+
result = LLVM::InsertValueOp::create(rewriter, loc, result, fatPtr, pos);
237237
result = LLVM::InsertValueOp::create(rewriter, loc, result, fatPtr,
238238
kAlignedPtrPosInMemRefDescriptor);
239239
result = LLVM::InsertValueOp::create(rewriter, loc, result, offset,

0 commit comments

Comments
 (0)