SETCC with f16 vectors has OperationAction set to Expand but still gets
lowered to FCM* intrinsics based on its result type. This patch skips
lowering of VSETCC if the operand is an f16 vector.
v4 and v8 tests included.
Differential D15361
Do not lower VSETCC if operand is an f16 vector Authored by pirama on Dec 8 2015, 4:33 PM.
Details SETCC with f16 vectors has OperationAction set to Expand but still gets v4 and v8 tests included.
Diff Detail
Event TimelineComment Actions Hi Pirama, I'm slightly concerned that LowerSETCC is being called when the operation action is Expand. Could you please elaborate/investigate why this is the case before we go ahead with this patch? Cheers, James Comment Actions Hi James, During legalization, custom lowering is called based on the result type of a node and not its operand type. In this particular case, the caller is LegalizeOp in lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp (look for a switch statement close to the end of this function). Since the result type in these cases are i16 vectors, lowering still gets invoked. As an aside, the legalizer queries OperationAction based on type of operand when legalizing operands and type of result when legalizing results. That is what necessitates these explicit checks/filters. -Pirama Comment Actions Ping... James, can you look at my earlier comment answering your question? Thanks, Comment Actions Hi Pirama, Sorry for the long response time on this. It LGTM. Thanks for the explanation! James |