Question about translate llvm dialect to llvm ir

I made it have two return values when I created llvm.call_intrinsic, and I modified the definition of its tablegen.

I have a problem when I translate llvm dialect to llvm ir.

Subsequent IRs using the results produced by the intrinsic op were unsuccessful.I’ve found that the general practice is to map the Value of an mlir to an llvm ir.

I’ve found that the general practice is to map the Value of an mlir to an llvm ir.You can see the link below.I was wondering if there is a solution for the case of returning two or more Values.

I would appreciate it if I people help me with my questions.Thank you.:waving_hand:

LLVM intrinsics being function calls in LLVM IR, I don’t see how can they have more than one result. LLVM IR doesn’t support returning multiple values from a function and would return an anonymous struct instead, which is a single result. They may have zero results though, so the highlighted condition differentiates between single-result and zero-result intrinsic function calls.

1 Like

Yes, if we have two results, such as, vector<16xi32>, vector<16xi32>, we can return strict(vector<16xi32>, vector<16xi32>).:grin: