[DAG] SimplifyDemandedBits - fold AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
If all the demanded bits of the AND mask covering the inserted subvector 'X' are known to be one, then the mask isn't affecting the subvector at all. In which case, if the base vector 'C' is undef/constant, then move the AND mask up to just (constant) fold it directly. Addresses some of the regressions from D129150, particularly the cases where we're attempting to zero the upper elements of a widened vector. Differential Revision: https://reviews.llvm.org/D129290
Loading
Please sign in to comment