<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56529>56529</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [AMDGPU][GFX11] exp should have at least one target
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:AMDGPU
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dpreobra
      </td>
    </tr>
</table>

<pre>
    In contrast with GFX10, GFX11 does not allow `en=0`, i.e. the following code is not legal:

    exp mrt0, off, off, off, off

I prepared an MC patch to check this limitation, but then noticed that codegen has GFX11 tests with `en=0`, for example, see `llvm.amdgcn.exp.ll`:

    ; GCN-LABEL: {{^}}test_export_zeroes_f32:
    ; GCN: exp mrt0 off, off, off, off{{$}}
    ; GCN: exp mrt0 off, off, off, off done{{$}}
    define amdgpu_kernel void @test_export_zeroes_f32() #0 {

      call void @llvm.amdgcn.exp.f32(i32 0, i32 0, float 0.0, float 0.0, float 0.0, float 0.0, i1 false, i1 false)
      call void @llvm.amdgcn.exp.f32(i32 0, i32 0, float 0.0, float 0.0, float 0.0, float 0.0, i1 true, i1 false)
      ret void
    }

@Sisyph, is this a legal GFX11 code?



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVE1vnDAQ_TXmMgoyZlnCgUM2m0SRkqpSVam3lYEB3BiMbJM0_fUdwyZN0qZSe-nKMuO15_m9-XBlmsfyeoTajN5K5-FB-R6uLr8knInzxUigMehgNB6k1uYB2JbjyNI9JyMcUjHG4HuE1oR9NXYE1yCo1UljJzVLzxjfM36cgX74bYLB-gXCtO3vPy98rmGyOEmLDcgRbs9hkr7uwRuoe6zviAFdqNWgvPTKjAGhmn0gNgYeqiZH30u_kOvoz166o0CPzrtV-ltxrbHEVA6TxrB0iOGI1vdDLIemq8eYdMRah-O_amTpDq7OP5zcnO0ubmgfWL4LI7tg-Z5GuPhAAMb6w3e0FOdDm4pnoBcQwfkpYu-Ha0UXmxX930Ao3SO-i9Rgq0aEoH2aD3doR9Rwb1QDbMPfkSNOmSiAiZQv-t_ECKCmunrGeBvaFUClAtZiezJabSiXPP6bhUqgldrha7v4X1y8nf9ExaJfmLxI41MmjvOGf1LuceoXELd2gFwb7ljZodZZevnKa5mjpkybIi1k5JXXWLJsd3a7v_r4mWV7shdvMpdycb2ZdUP9ck-JDw0dHgoqEvDSduij2eqy935yoXDFJY2OWmmu4toMtAhRPH5OJmu-Yu1pqZyb0ZGRbTNRRH3JN0nSJKdJlklZ5Zi121xksk4KnvO8pSNaVqhdYMqEqGR9h2NDNx5pC0F0I1UKLgTPk02yTQXfxkVeFKnAhG_zU5FtOMUMB6l0vOTW2C6y5cKsmjsXUq7oKfi5KZ1T3YhLfAK-nH1vbNnQU2QqK6NFRblI-AEsfYvM">