https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77333
--- Comment #11 from Tony Kelman <tony at kelman dot net> --- Thank you! -fno-devirtualize on its own did not help. -fno-ipa-cp on its own did fix the problem. Adding -fno-ipa-cp only when compiling lib/Transforms/Vectorize/SLPVectorizer.cpp was enough to fix the problem. Adding -fsanitize-undefined-trap-on-error as well for that same file didn't make a difference. I can post dump output for compiling that same file, if that's what you meant. In terms of whether or not this is caused by undefined behavior in the source being compiled, the commit https://github.com/llvm-mirror/llvm/commit/225dd82d634ca277 made a small modification to the file in question that prevented the problem from manifesting. If anything jumps out at you as being definitely undefined behavior prior to that commit, then we could look into carrying that patch, but it's very strange that this only happens with this one particular target. That commit was even intended to not be changing any behavior except when a newly-added feature is used.