[PATCH] D74495: [VectorCombine] try to form vector binop to eliminate an extract element
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 13:01:57 PST 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:103
+ // TODO: Relax the one-use constraints by adjusting the cost calc.
+ if (Ext0 != Ext1 && (!Ext0->hasOneUse() || !Ext1->hasOneUse()))
+ return false;
----------------
But even if it's the same extract, do we not care whether it will go away or not,
unlike the case with two different extracts?
I.e. for now i'd expect
```
if (!(Ext0 == Ext1 && Ext0->hasNUses(2)) &&
!(Ext0->hasOneUse() && Ext1->hasOneUse()))
return false;
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74495/new/
https://reviews.llvm.org/D74495
More information about the llvm-commits
mailing list