<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylVEtvnDAQ_jVwsYLAvMyBw2a3lXKNVu0xGpsBXHkB2Sbp9td3zO6mkRopSitZY-yZ-eabB5Zzd26_IwOLzCHqaWDgHFqv54mhtbN1TE8sqlJjnk8R_2q0JPnwSGI_T87D5F2iloUsGPQeLVMjTAOy0fvFRfmODGkN2o-rTNS8YVyhaLtb7PwDlacj6U46fEiJ0HMAVdWiyvO6aLDORVlUVQdZCplKM57KXLIXcMzA1GGXsOOIF77shM4BESBtCJ8eovQmq_S6tqMi3yHi92HlO_ZRgvmOc5EFS7r0Wl0cKEK-uxmyiO_-vv3yc7GXmwH9vfZ7cJSmeN894vs3wMfzgrdbOc8m4k0gsHttESUT4B4I4OKhwsl9A6M7ihHu7aqC6UX9Gn7P9kEcnD-eCZWCVLRo4w_Tc_Bm6soKiT6T2qvNLyOLiNesB22o7u8W9iL_dKTTDpYFaca664z4UbvboIQuWnymhEhtZgXGnJO3QI9IQ9KtivzIC7wHNWIX6nC1Ku_lqk3nnoTgZVOXgouy4mEvsqcwVjQjTwtYKtqdKFWdZckvvUTlgSr06THtKW9Hey3SRggR5vVfglMj36QYd23eNXkDMax-nG37C-08n3CAeLWm_TRJ7dy6sSx50xTx2HallA1gU0PRVUWfFU2viirnfSqFAoGxAYnGtVRLavCEL2yDCM0uD_H_M9AtTzlPs7TImqzhTVIBl7ISKQiZK5mWUZHiiWYqCTjJbIfYthukXAdHSqMd_YevSnqk9DAhboSJodfeYLt75-n64LemeWLH-ci2xyDeWLcb5d-fa5pR>52994</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Assertion errors in llvm/lib/IR/Constants.cpp at ToT clang
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zeroomega
</td>
</tr>
</table>
<pre>
We are seeing assertion errors in `llvm/lib/IR/Constants.cpp` after change https://github.com/llvm/llvm-project/commit/bbeaf2aac678633749e7385466da10a1c0120b3b was landed. The error message was:
```
clang++: llvm/lib/IR/Constants.cpp:2281: static llvm::Constant *llvm::ConstantExpr::getBitCast(llvm::Constant *, llvm::Type *, bool): Assertion `CastInst::castIsValid(Instruction::BitCast, C, DstTy) && "Invalid constantexpr bitcast!"' failed.
```
The error disappeared after this change was reverted locally.
Reproducer is attached:
[builds_8825975828562758241_command_parser-85c711.zip](https://github.com/llvm/llvm-project/files/7809888/builds_8825975828562758241_command_parser-85c711.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydVEtvozAQ_jVwsYrAvMyBA012pV6raPdYjc0EvHIA2abd9NfvmCTdSlup6krWOJ73N_MROffn9icysMgcop4GBs6h9XqeGFo7W8f0xKIqNeb5FPHvRkuSD48kdvPkPEzeJWpZyIPB0aNlaoRpQDZ6v7go78iRzqD9uMpEzVuOayq67hY7_0Ll6Um2kw4_pEQ4cgBV1aLK87posM5FWVRVD1kKmUoznspcshdwzMDUY5-ww4iXftkJnQNqgKyhfLqP0pus0uvZnopih4jfh5N37DOAece5yIInKb1WlwCqkHc3Rxbx7l_tt9-LvWgG9Pfa78ARTPFxeMR37xIfzgvetHKeTcSb0ED3tiICE9I9UIJLhAov9wOM7qlG0NtVBdeL-a38ju2C2Dt_OFNWKlLRoYs_TM8hmqlrV0jtM6m92uIy8oh4zY6gDc39w8Fe5N-N9NrBsiBxrL9yxI_a3YgStmjxmQCR2cwKjDkn7xM9IpGkXxXFURR4D2rEPszh6lXey1Wb3j0JwcumLgUXZcXDXWRPgVbEkacFLA3tTpSqzrLkVS9RuacJfZmmR8Lt6K5F2gghAl__pzgt8h3EuG_zvskbiL32Btvug2_wE37SYNhhPrCN1fFqTftlaNq5dcNW8qYp4rHNUVVZU6pjhaAKJQTIviIItcyrUqg6NiDRuJY2QLSY8IVtKQJFyn2sW55ynmZpkTVZw5ukAi5lJVIQMlcyLaMixRPxKAl9JLMdYttuLcl1cGQ02hG2NyP9MelhQtzKUX5Y_Tjb9hXtPJ9wgHgr3m7N_wHFuYSp">