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

    <tr>
        <th>Summary</th>
        <td>
            Clang crash  starting with 6a605b97a2006
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          m-gupta
      </td>
    </tr>
</table>

<pre>
    @jmorse starting with 6a605b97a2006, we have noticed a clang crash when building Linux kernel in Chrome OS when asserts are enabled.
It still repros on ToT.

reduced test case :

[repro.zip](https://github.com/llvm/llvm-project/files/8182516/repro.zip)

Stack trace:
3.      Running pass 'Function Pass Manager' on module 'tlb-9e7172.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@switch_mm_irqs_off'
 #0 0x00000000079e332a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:11
 #1 0x00000000079e34db PrintStackTraceSignalHandler(void*) /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:1
 #2 0x00000000079e1b9a llvm::sys::RunSignalHandlers() /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/Support/Signals.cpp:97:5
 #3 0x00000000079e3bf5 SignalHandler(int) /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
 #4 0x00007fbf83d87200 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13200)
 #5 0x00007fbf8381c891 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:50:1
 #6 0x00007fbf83806536 abort ./stdlib/abort.c:81:7
 #7 0x00007fbf8380641f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
 #8 0x00007fbf8380641f _nl_load_domain ./intl/loadmsgcat.c:970:34
 #9 0x00007fbf83815212 (/lib/x86_64-linux-gnu/libc.so.6+0x35212)
#10 0x00000000066286ee llvm::MachineFunction::salvageCopySSA(llvm::MachineInstr&) /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:0:5
#11 0x0000000006628d2d llvm::MachineFunction::finalizeDebugInstrRefs() /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:1209:23
#12 0x00000000096ced67 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /usr/local/disk2/llvm_monorepo/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:658:7
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9VtuO2zYQ_Rr5hbBAUfcHPzi73XSBBgniLdA3gZJGNrM0pZKUdzdf3yEtr2x327RAEsOQxNvMOTPDQ9Z9-7IKEvpl32sDxFiurVBb8iTsjmQ8o2ld5pxRmgXshjwB2fEDENVb0UBLOGkkx9mN5mZHnnagSD0K2ToLvwk1PpNH0AokEYrc7HS_B_Jxc5zHjQFtDeEaCCheS2jDgN4GdH1vEYaQkmgYdG9Ir8hD_zANHp8a2tH5t2AsaTgCD-L1-YQgfedXh1_FEKS3ASt21g7GzWJ3-N8ivbEOm36PDSkPp9cS13yBxmKzExIMvouoYGmE9O9mi6w8d7axvHkkVvMGXmHEiLf8PCrlQjEgWRKw_G5UjRXI55Pr-MAV34LGfkdx37ejBDfLynpZQh7lLGywORFP3jL4R5GR2_X7ZRD_gi9yr4zV49HFBiT4r8l-d_KNbcy3wQQ3u2q_r4T-01R917l-7wlnxJTQZ3r65SXEMePExwkJxmvzYo4fn7RQ1vN_8PRZMU_S_KnqERBwjK4vH5yLoUP7d6PRLuJ9wyW-W2Ee2ZSBat-rHiPd_z0jpzyJGp-bcRh67bp_V-LZdYit4tKEQjXoPM1SfEbRTCm6ppS0NbnCf7TxK1etdIkpDr1oA7b-WaCzmDnQM2Z2hTmqyzfTgHVxAR3r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