- // div X, (Cond ? 0 : Y) -> div X, Y. If the div and the select are in the
- // same basic block, then we replace the select with Y, and the condition
- // of the select with false (if the cond value is in the same BB). If the
- // select has uses other than the div, this allows them to be simplified
- // also. Note that div X, Y is just as good as div X, 0 (undef)
- if (Constant *ST = dyn_cast<Constant>(SI->getOperand(1)))
+ // [su]div X, (Cond ? 0 : Y) -> div X, Y. If the div and the select are in
+ // the same basic block, then we replace the select with Y, and the
+ // condition of the select with false (if the cond value is in the same BB).
+ // If the select has uses other than the div, this allows them to be
+ // simplified also. Note that div X, Y is just as good as div X, 0 (undef)
+ if (ConstantInt *ST = dyn_cast<ConstantInt>(SI->getOperand(1)))