Conversation

Turning non-termination into memory corruption and other awfulness isn't something that safe languages can accept. It doesn't matter that it's already a bug. It has to remain safe, and has an impact on language semantics. The sideeffect attribute has a huge performance cost.
2
Compilers are extremely bad at proving termination and the issue with the sideeffect intrinsic is it acts as a universal side effect and is not handled by optimizations. It is treated as potentially doing global memory writes, etc. and completely breaks all other optimizations.
1
So for example, you can have a simple loop over an array based on the length, and the compiler may not be able to tell that terminates since it can't tell that the length of the array isn't changed (even though a human trivially can). If you insert the intrinsic it destroys perf.
2
The compiler can no longer really optimize the loop. It has a universal side effect in each iteration which could do pretty much anything including writing to memory. It's a terrible 'solution' to present for a self-inflicted problem that's easy and straightforward to solve.
1
You would need to insert that intrinsic into most function calls and loops, destroying performance. Simply disabling removal of functions that may never terminate will BARELY impact performance and would be straightforward but they haven't done it instead proposing an awful hack.
1
You can't permit that in C either in the general case, even with how the standard was defined, since they only made infinite loops able to terminate if they have a non-constant condition (my Clang example has a constant expression: 1) and the loop has no side effect.
1
The solution is very simple for LLVM: do not remove function calls if removing the function call can impact semantics. Non-termination is a side effect. If they want that optimization, they have to check if the function is known to always return, which they can very easily do.