dmgreen added a comment. It looks like there are patterns for A[0]*B+C and B*A[0]*C to handle commutivity. Are there tests for both forms too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158008/new/ https://reviews.llvm.org/D158008