samparker added a comment. All of your test cases are rooted at an or, so it makes sense to search up from there. Why not start with searching just from or (and xors?) and then add the search from more operators in later patches? https://reviews.llvm.org/D49229