the testcases in PR1860 from taking more than 1 hour (when I killed it) to taking 1s. llvm-svn: 52347