[InstCombine] prevent miscompiles from select-of-div/rem transform
This avoids the danger shown in issue #60906. There were no regression tests for these patterns, so these potential failures have been around for a long time. We freeze the condition and preserve the optimization because getting rid of a div/rem is always a win. Here are a couple of examples that can be corrected by freezing the condition: https://alive2.llvm.org/ce/z/sXHTTC Differential Revision: https://reviews.llvm.org/D144671
Loading
Please sign in to comment