Currently we only match uniform operands against a broadcasted scalar, this patch adds support for matching a broadcasted vector value as well.
We still expect the operand to have come from an argument or global value.
Paths
| Differential D28458
[CostModel] Improve detection of uniform operands AbandonedPublic Authored by RKSimon on Jan 8 2017, 11:39 AM.
Details
Diff Detail
Event TimelineRKSimon updated this object.
Comment Actions Abandoning this - I'm going to update the uniform shift tests to use the broadcast( insert_elt undef, scl, 0 ) pattern instead which should work for the cost model and leave the vectorizer to compute the value kind in their own ways,
Revision Contents
Diff 83569 lib/Analysis/CostModel.cpp
test/Analysis/CostModel/X86/vshift-ashr-cost.ll
test/Analysis/CostModel/X86/vshift-lshr-cost.ll
test/Analysis/CostModel/X86/vshift-shl-cost.ll
|
Is this code actually used anywhere, except for the cost-model printer pass?
It looks like the only (in-tree) caller of getOperandInfo() is CostModelAnalysis::getInstructionCost(), but actual cost model consumers don't use getInstructionCost(). Rather, they call getArithmeticInstrCost() directly, and provide their own opinion on the operands' uniformity.
If that's really the case, I'm not entirely sure there's a point in trying to make this more precise.