[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [llvm-bugs] [Bug 55801] Infinite loop in InstCombine with boolean expression
From:       LLVM Bugs via llvm-bugs <llvm-bugs () lists ! llvm ! org>
Date:       2022-05-31 19:03:45
Message-ID: 20220531190345.fcc1a7e2765fc852 () email ! llvm ! org
[Download RAW message or body]

[Attachment #2 (text/html)]

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

    <tr>
        <th>Summary</th>
        <td>
            Infinite loop in InstCombine with boolean expression
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Repro is below. `opt test.ll -S -O2` runs forever. 

revision: 5cb14dc5a3a6

Looking at traces it looks like `SimplifyOrInst` in involved in the transformation \
cycle.

```
define { i1, i1, i1, i1, i1 } @test(i1 %a_0, i1 %a_1, i1 %a_2, i1 %a_3, i1 %b_0, i1 \
%b_1, i1 %b_2, i1 %b_3) { entry:
  %0 = and i1 %a_0, %b_0
  %1 = and i1 %a_3, %b_3
  %2 = xor i1 %a_2, %b_2
  %3 = and i1 %a_1, %b_1
  %4 = xor i1 %3, true
  %5 = and i1 %0, %a_1
  %6 = and i1 %2, %b_1
  %7 = or i1 %3, %6
  %d = or i1 %7, %5
  %8 = xor i1 %d, true
  %9 = xor i1 %8, true
  %10 = xor i1 %1, true
  %11 = and i1 %10, %4
  %12 = xor i1 %11, true
  %13 = insertvalue { i1, i1, i1, i1, i1 } zeroinitializer, i1 %9, 0
  %14 = insertvalue { i1, i1, i1, i1, i1 } %13, i1 %4, 1
  %15 = insertvalue { i1, i1, i1, i1, i1 } %14, i1 true, 2
  %16 = insertvalue { i1, i1, i1, i1, i1 } %15, i1 %a_3, 3
  %17 = insertvalue { i1, i1, i1, i1, i1 } %16, i1 %12, 4
  ret { i1, i1, i1, i1, i1 } %17
}
```
</pre>
<img width="1px" height="1px" alt="" \
src="http://email.email.llvm.org/o/eJydlcFuozAQhp8GLlYRNhiSA4e2UaVKK1XaPsDKhiHx1rEj26T \
NPv3aJCkOyaGKhGDG_uafMTYD192h-Q07o5GwiIPUnxlKqlzvHHJgXSYlenhHD2_EDyIzKIt6bWAPxmP5Kskfj \
3c_JKzQKikeEW05LruWsoJVMfNL6w-h1oh5acNasEg4JP2gRVJ8QEj7LrY7KfrDm3lV1oWUQvlrr-UeumC7DYR \
gZX0VW-Z8RtQeWglZnMjHna7R7aAXysvXT0jghDzfvPvpFUrKPCw6IYswQCj7k59ng4Njh8ROMTk8juFxDI9je \
IhZhqKORYJy5uDf3tFDAclRUqwQUx26qOaUY-LwFVd8c0XEkZH70uZyDafKJq640sPfHI64cqY3ZnVmgIihM63 \
zCtiFUjWjyM189UhdpgvBEdJdIvUJoRGymFXd3ah6OWMWNxiczyB8C5rvDT6_gDKm5juDb2od90UoC8btmRx-d \
KT_gdFCCSeYFN6eDuAymBfHqLxHfyxsUi2DGW8apveqlid_fA3ejI8oru5VpVefbfyJ4Ppe3WrSxePx_d5gA-6 \
nIvWpf9WrWSNLu6bolsWSpU44Cc2r6sOmQmifu9AXQ7t81lseGt2ncBvEtZbAFIKvnQEbWnM6GNlsnNvZ0GbIi \
7_Wnhx41uqtd6Tcnx8P_n_wF1rfCF-EtQNYb1C6yHG6aeiywFXLO9IDrTva1iUvu7JiDPq27niXSuZ_I7ZJ6FN \
CiIJPNEp4O6GrVDQkJySnBcbLvChp1rctZjWQuqJ9u_BffpnDlgmZhToybdapacaS-LC2flIK6-w0yfzS1gpgTOf12eA22jRb2EDfp2PmZqz8P0ty0Pk">



[Attachment #3 (text/plain)]

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic