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

    <tr>
        <th>Summary</th>
        <td>
            llvm/test/Transforms/SampleProfile/csspgo-import-list.ll fails in -DLLVM_ENABLE_EXPENSIVE_CHECKS=on builds
        </td>
    </tr>

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

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

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

<pre>
    The test fails in `-DLLVM_ENABLE_EXPENSIVE_CHECKS=on -DLLVM_ENABLE_ASSERTIONS=on` builds, both Debug and Release.

At `llvm/lib/Transforms/IPO/SampleProfile.cpp:1420`, the initialized `NewCandidate` may have a `null` `CalleeSamples`, leading to `assert(LCS && RCS && "Expect non-null FunctionSamples"); ` failure in `(anonymous namespace)::CandidateComparer::operator()`

@WenleiHe 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkkFzozgQhX-NuKjsEg3G-MDBsaGSWsdJ2ans3lINtEG7QqIkkazn10_J9kwmc5oLRXU3r18_PnROdpqoYIs7tthGOPne2OIR3X8HPEe1ac_FS0_ck_P8hFI5LjVnmZhtd7vXx7dyv77blW_lP8_l_vjwWr5t7svNX0eWbI3mX2fWx2N5eHl42l-7LBO8nqRqHYMNr43v-ZbqqeOoW34gRehozsSWifX1ufZhr1LvA4NKyZpB9WJRu5Oxg2NQPTw_MaiOOIyKnq05SUXzZhxZso5TECwTYY_viUstvUQlv1EbFPf0sUHdyhY9BVMDnnmP78QxdPWkVKiyTGxQKaLrAnfTU4St1B33Jkygc2Q9g3y3OXIGGYOMHz5fGUD5_0iN59roWVDm1aQbL43-oQrAYMWSu6B2yXuydEucQY7a6PNgJsc1DuRGbOgyvmbJ-ucNGzOMaMley2Yki95YBnkYzcSvkbJU_E1akbwnHrVF0q6SFUZUxMt4lYnFEiDqC4CkXsVtJvKG8gTzPKYsTWGZtSckgUkkCxCQigxyEPEC4nndYJ1RItImTuu6rVkqaECp5uHnzY3tIuncRMVqGYs8UliTchcAATR98EszJLHYRrYI38zqqXMsFUo67z5VvPSKihsRgdDfkfgCA4OqcW7szEwOo7F-FtTmSn1i_SdMX5GNJquK3vvRhZShYlB10vdTPW_MBc8bpcH7aM2_1ARvl8OCr-vh7wV8DwAA__8oCxe1">