[clang] [llvm] [IR] Avoid creating icmp/fcmp constant expressions (PR #92885)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 3 05:10:59 PDT 2024


mikaelholmen wrote:

Hi @nikic 

The following starts crashing with this patch:
```
opt ic2.ll -S -o /dev/null -passes=instcombine
```
It hits
```
opt: ../include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From *) [To = llvm::TruncInst, From = llvm::Value]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
```
[ic2.ll.gz](https://github.com/user-attachments/files/15533503/ic2.ll.gz)


https://github.com/llvm/llvm-project/pull/92885


More information about the cfe-commits mailing list