I committed a change to fix pr4731 yesterday but after thinking about it some more, I'd like to get other opinions about this. Chris and I talked last week about the need to canonicalize the types used for Neon vector shuffles so that they get CSEd. I guess this was an issue that came up for SSE.
For pr4731, I changed llvm-gcc to canonicalize a bitwise vector operation to use i32 elements. For these operations, the type doesn't matter since the vector are treated as a bunch of bits. I was thinking that we should do the canonicalization for all the bitwise vector operations. But is llvm-gcc the right place to do that? The changes that I discussed with Chris were in code gen. It seems like the front-end is not the best place to do that kind of optimization and that ideally the optimizer would be able to recognize that bitwise vector operations do not depend on the element type.