[PATCH] D129545: [RISCV] Scalarize binop followed by extractelement.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 10:02:25 PDT 2022
reames added a comment.
LGTM.
This is a straight forward port of the X86 logic, and is a reasonable stepping stone. However, I think framing this in terms of legality leaves some potential cases on the floor. Specifically, we can have cases where the scalar op isn't legal, but is still cheaper than the legal vector op.
An example might be a 32 bit udiv. Masking off the high bits requires two extra instructions, but that's probably still profitable over doing the vector op on a long vector.
Long term, I'd propose we frame this in terms of the expected cost of the two forms, not the legality of either side directly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129545/new/
https://reviews.llvm.org/D129545
More information about the llvm-commits
mailing list