Created attachment 3331 [details] testcase Running opt -loop-rotate transforms a program that runs correctly into one that produces a segmentation fault.
Created attachment 3332 [details] script that demonstrates the problem
Looks like this was introduced by revision 78890.
In the end it looks like this is a duplicate of 4735. It is fixed now.