[PATCH] D80885: [VectorCombine] scalarizeBinop - support an all-constant src vector operand
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 08:12:08 PDT 2020
spatel added a comment.
In D80885#2073650 <https://reviews.llvm.org/D80885#2073650>, @RKSimon wrote:
> In D80885#2073312 <https://reviews.llvm.org/D80885#2073312>, @lebedev.ri wrote:
>
> > I'm having a hard time following `scalarizeBinop()` now.
> > Perhaps it can be refactored somehow?
>
>
> I'm hesitant to start refactoring yet as an imminent change will be to add cmp support (PR37463) will require further changes that aren't clear yet. @spatel - any suggestions?
I haven't looked at how to cram cmp into this yet. As we can see, the existing code for extract/extract patterns ended up being rather big. Not sure how much of that we can avoid going in this direction.
I think this is a good implementation, but as suggested, adding some bool predicates for readability will help.
I had an early draft version of this patch where the constant operand case was just split off as a separate function, so that duplicated a lot of code and didn't seem worth the cost.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80885/new/
https://reviews.llvm.org/D80885
More information about the llvm-commits
mailing list