[PATCH] D24031: [InstCombine] replace fold of an icmp pattern that should never happen with an assert
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 15:10:33 PDT 2016
efriedma added a comment.
The initial worklist visits from the top down, but that isn't a general guarantee that every operand of an instruction will be completely combined before you visit that instruction. For example, suppose the zext has a second use. If that use is proven dead and erased between the visit to the "and" and the visit to the "icmp", you can trigger the assertion. (Or something along those lines; I haven't actually gone through and proved that particular example works the way I described it.)
More information about the llvm-commits