[Mlir-commits] [mlir] [mlir][LLVM][NFC] Simplify `copyUnrankedDescriptors` (PR #153597)
Tobias Gysi
llvmlistbot at llvm.org
Thu Aug 14 08:59:53 PDT 2025
================
@@ -688,28 +688,32 @@ struct ReturnOpLowering : public ConvertOpToLLVMPattern<func::ReturnOp> {
auto funcOp = op->getParentOfType<LLVM::LLVMFuncOp>();
bool useBarePtrCallConv =
shouldUseBarePtrCallConv(funcOp, this->getTypeConverter());
- if (useBarePtrCallConv) {
- // For the bare-ptr calling convention, extract the aligned pointer to
- // be returned from the memref descriptor.
- for (auto it : llvm::zip(op->getOperands(), adaptor.getOperands())) {
- Type oldTy = std::get<0>(it).getType();
- Value newOperand = std::get<1>(it);
- if (isa<MemRefType>(oldTy) && getTypeConverter()->canConvertToBarePtr(
- cast<BaseMemRefType>(oldTy))) {
+
+ for (auto it : llvm::zip_equal(op->getOperands(), adaptor.getOperands())) {
----------------
gysit wrote:
```suggestion
for (auto [oldOperand, newOperand] : llvm::zip_equal(op->getOperands(), adaptor.getOperands())) {
```
nit: structured bindings would be nice if it works here.
https://github.com/llvm/llvm-project/pull/153597
More information about the Mlir-commits
mailing list