title: Approaches in debugging segfaults caused by LLVM optimization
body: <p>We have a third party library, SPEC, that we use to test with. An optimizer pass in our local LLVM version causes SPEC to crash after SPEC has been optimized by our version of SLP Vectorizer.</p>
  
  <p>I know specifically which file in the 3rd party library is segfaulting, but I do not know exactly what the transformation that is happening causes the segfault. I know that with SLP enabled, it causes it to crash. I also have the IR / assembly of the optimized vs unoptimized code, but I do not know which line in the library it actually segfaults.</p>
  
  <p>I've been able to narrow down the file that causes the segfault in the library, and I know that it's a vectorization of a store that's causing problems (ie, if I disable that transformation, the library no longer segfaults). However, I didn't write the passes nor the libraries. I don't know how to continue. What approaches can I take to identify such problems?</p>