[InstCombine] Fold memcmp of constant arrays and variable size
The memcmp simplifier is limited to folding to constants calls with constant arrays and constant sizes. This change adds the ability to simplify memcmp(A, B, N) calls with constant A and B and variable N to the pseudocode equivalent of N <= Pos ? 0 : (A < B ? -1 : B < A ? +1 : 0) where Pos is the offset of the first mismatch between A and B. Differential Revision: https://reviews.llvm.org/D127766
Loading
Please sign in to comment