<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/105545>105545</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`mlir-translate` crashes when `--split-input-file` is used on a mlir test with `omp::TargetOp` in it.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bhandarkar-pranav
</td>
</tr>
</table>
<pre>
`mlir-translate` crashes when `--split-input-file` is used with a mlir code with `omp.target` in it.
```
$> mlir-translate -mlir-to-llvmir --split-input-file target-private-simple.test.mlir
within split at target-private-simple.test.mlir:1 offset :2:3: error: Unable to get unique ID for file
omp.target {
^
within split at target-private-simple.test.mlir:1 offset :2:3: note: see current operation:
"omp.target"() <{operandSegmentSizes = array<i32: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>}> ({
"omp.terminator"() : () -> ()
}) : () -> ()
within split at target-private-simple.test.mlir:1 offset :2:3: error: LLVM Translation failed for operation: omp.target
omp.target {
^
within split at target-private-simple.test.mlir:1 offset :2:3: note: see current operation:
"omp.target"() <{operandSegmentSizes = array<i32: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>}> ({
"omp.terminator"() : () -> ()
}) : () -> ()
```
Here is the reproducer
```mlir
llvm.func @target_simple_() {
omp.target {
omp.terminator
}
llvm.return
}
```
This is discussed more in detail [here](https://discourse.llvm.org/t/request-for-input-on-a-fix-for-a-bug-utilizing-omp-targetop-in-conjunction-with-mlir-translates-split-input-file/71785)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVU2P2zYQ_TXUZUBDGn0fdPCu12iBFD1k22tASSOLqUQq_Ng0-fUFJbneTYJuC6S3AIY-6BnOe_OoecJaeVFEDcvvWH6KhHejNk07CtUL84cwfDFCiaeo1f2nhhXxPEnDnRHKTsIRK2LojLAjWfg4kgJWxJzbZZKOS7V4xwc5rVHSgrfUw0fpRhAQtoFO97QtsCLW83JwwlzIreEKpDuw-MTi434t4v23vWLG0gd4CQf49q75ND3N0sDXWGCrwRcjn4QjbuW8THRwZN0hJG-7B1BSwZoMwr2alB4T0MNgyQFLj8jSY8rSI5AxOvwJvynRhtoaLuTAK_nBE_x8gkEbWDu0VgW4NQFYeXddZfnDd4WltKNwt0TQeWNIOdALGeGkViy9NhzxmSaIDCuGNbD0npV3a7jq39JlJuXeys9kgaUnEMaITyy9l2moBjHD-_96SR9YeQrahoLPmrDDITNLJZw2zyEdYX_k10Ssdxbl6bWQ7y32mze__wKP-5mUWsEg5ET9KvbzNj9T-x_1_yH__yr_F4PlJzIUppUbCQwtRve-I_NF6G1ShEFzGLzqgGXx1qx3mxDvrvBuJL79ee_rN2ZXyuVpf1yLGHLeqButb4F_HKUN4HtpO2_DvJ11oKOgJyfkBCy_G8kQy08Mq9G5xQbB8czwHHK0N5YOazltLgzPjuHZ0AdP1vFBm32QasUFH-Sf65Lgrb9w7-QkP0t14Xpe-EZSL1wq3mn13qsuHC4eTjB_ObPt13aB5zIpq5xhHfVN2tdpLSJqkhIzzEtEjMam7GvMiiEr6m4g0aKIi6JKkzSuBPVJXUWywRizuMIkKTBGPCRtMVCVl0VV563IiGUxzUJOf7ONpLWemiTO8yyPJtHSZFdbRFzlRgwGaZoQHyhblsWTtM7ednDSTfQvXPJ1m9TqapLhc95McnfJIFh6fFw7_OtyM8vIm6l5KelFutG3h07PDM8B5X7ji9HvqQvirqQtw_PO-6nBvwIAAP__LpNyzg">