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

    <tr>
        <th>Summary</th>
        <td>
            Assertion failure in SelectionDAG
        </td>
    </tr>

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

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

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

<pre>
    We're seeing an assertion failure in SelectionDAG when building Fuchsia

Failing Bot:
https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.arm64-release/b8799099192459783297/overview


Diagnostic output:
```
[89930/276809](64) CXX obj/src/media/audio/lib/timeline/timeline.timeline_rate.cc.o
FAILED: obj/src/media/audio/lib/timeline/timeline.timeline_rate.cc.o
../../../recipe_cleanup/clangxe2ptd3r/bin/clang++ -MD -MF obj/src/media/audio/lib/timeline/timeline.timeline_rate.cc.o.d -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDE...
clang++: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:10274: void llvm::SelectionDAG::ReplaceAllUsesWith(SDNode *, SDNode *): Assertion `(!From->hasAnyUseOfValue(i) || From->getValueType(i) == To...
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: ../../../recipe_cleanup/clangxe2ptd3r/bin/clang++ -MD -MF obj/src/media/audio/lib/timeline/timeline.timeline_rate.cc.o.d -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_REM...
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '../../src/media/audio/lib/timeline/timeline_rate.cc'.
4.      Running pass 'AArch64 Instruction Selection' on function '@_ZN5media12TimelineRate7ProductES0_S0_b'
#0 0x0000564835ef2144 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../../../recipe_cleanup/clangxe2ptd3r/bin/clang+++0x3fbb144)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Fuchsia clang version 16.0.0 (https://llvm.googlesource.com/llvm-project 7aa0968842c5c36595042257009d1dc1a244ff6a)
Target: aarch64-unknown-fuchsia
Thread model: posix
InstalledDir: ../../../recipe_cleanup/clangxe2ptd3r/bin
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: clang-crashreports/timeline_rate-37a32c.cpp
clang++: note: diagnostic msg: clang-crashreports/timeline_rate-37a32c.sh
clang++: note: diagnostic msg:

********************
```
Reproducers:
[clang-crashreports.zip](https://github.com/llvm/llvm-project/files/9890819/clang-crashreports.zip)

I've bisected this down to https://reviews.llvm.org/D127531 in https://reviews.llvm.org/rG2ec51f1c753a63c786805708eb7875086cc5da9d

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdV0mzmzgQ_jX4ojIFYj_4gLcXVzm2yybLzMUlhAAlGFESvGV-_bTA20sylckyl3HJAkmt1qfW160mFdnL5AMzcCAZUozxukCkRkQpJlsuapQTXnUwxmt0YBWjunMeP6CnktUo7XiV6SnLjpaKE8OaG1Y81EuYqIemojWcc1_Zto3SLbyEQrlJSylOvDuZQhbQ03GoGvjnZ3142S_BpOrldVWRuji2QlS0JLw2tRIhmUnkyXfHEiASxfS8MIgiK4rsCLteFIQOjgLoFo9MPnL2dI90qOecFLVQLadIdG3T3VAbvnUuQ9ObhlHkWKANB35oRYY3N3DouwaO0OzjRyTSTzCmJIX6xLJ-G6TLuIBnxVOoW35iYBx292peXo6StMyk1BRnO8ar9WIOYH6zXtMEqVslGeUNO1KwX901F0M_M9y0mSO1QXl96TXwFAoav53Df_nbcJkZGs-P69V0ttsd56tDPF0vju9Xh9V0tV4lfxzjzWabxMlquzncCe4X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