[InstCombine] Guard against many users when swapping icmp operands
This addresses the compile-time regression reported on D144369. If we don't fold constant operands early, then we might end up walking very large use lists of constants here. Explicitly exclude constants, and also limit the number of inspected users to avoid degenerate cases like this. This entire transform shouldn't be part of InstCombine in the first place though.
Loading
Please sign in to comment