diff --git a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp index e1bbeb996d730..798d8b04eed76 100644 --- a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp +++ b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp @@ -146,7 +146,7 @@ struct BranchOpLowering : public ConvertOpToLLVMPattern { SmallVector flattenedAdaptor = flattenValues(adaptor.getOperands()); FailureOr convertedBlock = getConvertedBlock(rewriter, getTypeConverter(), op, op.getSuccessor(), - TypeRange(flattenedAdaptor)); + TypeRange(ValueRange(flattenedAdaptor))); if (failed(convertedBlock)) return failure(); DictionaryAttr attrs = op->getAttrDictionary(); @@ -178,12 +178,12 @@ struct CondBranchOpLowering : public ConvertOpToLLVMPattern { "expected single element condition"); FailureOr convertedTrueBlock = getConvertedBlock(rewriter, getTypeConverter(), op, op.getTrueDest(), - TypeRange(flattenedAdaptorTrue)); + TypeRange(ValueRange(flattenedAdaptorTrue))); if (failed(convertedTrueBlock)) return failure(); FailureOr convertedFalseBlock = getConvertedBlock(rewriter, getTypeConverter(), op, op.getFalseDest(), - TypeRange(flattenedAdaptorFalse)); + TypeRange(ValueRange(flattenedAdaptorFalse))); if (failed(convertedFalseBlock)) return failure(); DictionaryAttr attrs = op->getDiscardableAttrDictionary();