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

    <tr>
        <th>Summary</th>
        <td>
            MLIR: MLIR does not support all flags from LLVM 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

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

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

<pre>
    Suprisingly, I think that MLIR doesn't support all the flags from LLVM. Here is one example.

Consider the following LLVM file:
```llvm
define i8 @negation_of_increment_via_or_disjoint(i8 %x, i8 %y) {
  %t1 = or disjoint i8 %y, 1
  %t2 = sub i8 %x, %t1
  ret i8 %t2
}
```


Then, I run
`mlir-translate -import-llvm disjoint.ll`
and I get


```mlir
module attributes {
 llvm.func @negation_of_increment_via_or_disjoint(%arg0: i8, %arg1: i8) -> i8 {
    %0 = llvm.mlir.constant(1 : i8) : i8
    %1 = llvm.or %arg1, %0 : i8
    %2 = llvm.sub %arg0, %1  : i8
    llvm.return %2 : i8
 }
}
```

So it seems that the `disjoint` flag has entirely disappeared from MLIR. I think this is a bug in MLIR.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVF2vozYQ_TXmZRRkDITwwMPdm0a96t2XbtXXyOABvDU28sft5t9XxvnqblVppYig4ZyZ8RnP4c7JSSN2pP5E6mPGg5-N7V68l0Nwv4VZZ70Rl-5LWK10Uk_qQtgrvIGfpf4L_Mw9fH5_-x2EQacJazy4sK7GeuBKgZ8RRsUnB6M1C7y___k5h1_RIkgHRiPgN76sCnNCj4S-pOer0U4KtIltlDJ_Sz1tZBilQlJegWRP00-pjyWFBI5SI8gDkIpqnLiXRp_NeJZ6sLig9ucPyc_GnoV0X43UnrBDRLP6WzxYer0Q1gJpPqWcEEO-AFIewVi4ER_YVyiekWxDutDDU-ItxQ1l8cb27HqU5vjdmZ4VSc8_ZtRJfBv0Hb0oaXfecu0U9wg7uUT1d1GSe6u5UveMXAt4gwn9jwXutWPOFFqMCAqBe29lHzy6J1liiXwMevgZrQmruZ0oKV9AHq7CcDsVt0ALO1L-sqnz0H_TlW6ybkVjf_lgtPN8Sxpnc6Nf356ZxYNp7L1gqk3_i8AehDjGW8-JUcAPlA1p0Qerb_QnwGO2_zvkLwakB4e4uLRX8fqTPb2Lt6fbLsHMHaD20qK6xBHzdUVuUaQdi9uYPy2odHHXOPRhAqnT50x0pWjLlmfYFQ0rWFk1bZnN3UhFUfG-HipOuaiavi4qIVhRi3aoCzxksmOUVbQpmmJf7csyH4uG8obzfbNnvaAjqSguXKr8KveUSecCdm1b1mWmeI_KbWbD2HbLGIu2Y7sI3_VhcqSiSjrvHgm89Aq72HiU9e42oM2_zeY7o4EsWNXN3q8uOgY7EXaapJ9Dnw9mIey0uUb6263WfMXBE3ba2nWEnVLHHx37JwAA__9VLoN0">