This allows fixed length vectors involving splats on the LHS to commute into the _vx form of the instruction. Oddly, the generic canonicalization rules appear to catch the scalable vector cases. I haven't fully dug in to understand why, but I suspect it's because of a difference in how we represent splats (splat_vector vs build_vector).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I haven't fully dug in to understand why, but I suspect it's because of a difference in how we represent splats (splat_vector vs build_vector).
To close this. I believe it's because fixed vector uses build_vector of constants for the "step vector" while scalable vector uses the step_vector ISD node. The build_vector being all constants is canonicalized to the RHS. For the step_vector case there is no canonicalization preference so it keeps the order the node was created with which had the splat on the RHS.