de-vectorization pass


is there a target independent pass that replaces all vector operations by
scalar operations?


Shouldn't LegalizeTypes or some other part of Legalize do this?

Do you need this done before instruction selection? I don't know of any such
pass that operates before isel, but it wouldn't be hard to write one.