This change does a couple of related things: 1) It changes the default expansion strategy for scalable vectors for fcanonicalize. This switches us from emitting a loop (directly parallel to unrolling) to using the already available fmul expansion. 2) Mark RISC-V legal scalable vector types as Expand to leverage the previous item. 3) Wrap fixed vector types in their corresponding scalable types to avoid unrolling. The net effect is to improve the lowering for fixed vector cases and to no longer crash for the scalable ones. We were crashing because the scalable cases were marked Legal, not Expand. We could have just fixed that, but doing everyone at once seemed like a good investment. Note that we can also choose to follow Aarch64 and consider a vfmin based lowering. I left that until later thought it is worthwhile noting that's what we do for scalar code.
86 KiB
86 KiB