Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file Casting.h, line 114.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: opt -passes=instcombine x.ll
1.	Running pass "function(instcombine)" on module "x.ll"
2.	Running pass "instcombine" on function "trigger"
0  opt                      0x00000001050e954a18 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  opt                      0x00000001050e951e18 llvm::sys::RunSignalHandlers() + 204
2  opt                      0x00000001050e955348 SignalHandler(int, __siginfo*, void*) + 328
3  libsystem_platform.dylib 0x000000018a0e4f6144 _sigtramp + 56
4  libsystem_pthread.dylib  0x00000001850e52c960 pthread_kill + 296
5  libsystem_c.dylib        0x00000001850e5c0480 abort + 148
6  libsystem_c.dylib        0x00000001850e5bf6c4 __assert_rtn + 284
7  opt                      0x00000001060e75717c llvm::InstCombinerImpl::foldSelectICmp(llvm::ICmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, llvm::SelectInst&) + 1212
8  opt                      0x00000001060e75dc04 llvm::InstCombinerImpl::visitSelectInst(llvm::SelectInst&) + 564
9  opt                      0x00000001060e7516c0 llvm::InstCombinerImpl::run() + 648
10 opt                      0x00000001040e1b1dac main + 84
11 dyld                     0x00000001850e458d7c start + 6652
