Skip to content
Commit 1c19cc17 authored by Craig Topper's avatar Craig Topper
Browse files

[InstCombine] Don't fold select(C, Z, binop(select(C, X, Y), W)) -> select(C,...

[InstCombine] Don't fold select(C, Z, binop(select(C, X, Y), W)) -> select(C, Z, binop(Y, W)) if the binop is rem or div.

The select may have been preventing a division by zero or INT_MIN/-1 so removing it might not be safe.

Fixes PR36362.

Differential Revision: https://reviews.llvm.org/D43276

llvm-svn: 325148
parent 36c4862a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment