DAG: Try to custom lower when promoting float operands

For some reason this wasn't done for floats like
integers.

llvm-svn: 339811
This commit is contained in:
Matt Arsenault 2018-08-15 20:34:54 +00:00
parent 3124ce724a
commit 22f01268fe
1 changed files with 5 additions and 0 deletions

View File

@ -1750,6 +1750,11 @@ static ISD::NodeType GetPromotionOpcode(EVT OpVT, EVT RetVT) {
bool DAGTypeLegalizer::PromoteFloatOperand(SDNode *N, unsigned OpNo) {
SDValue R = SDValue();
if (CustomLowerNode(N, N->getOperand(OpNo).getValueType(), false)) {
LLVM_DEBUG(dbgs() << "Node has been custom lowered, done\n");
return false;
}
// Nodes that use a promotion-requiring floating point operand, but doesn't
// produce a promotion-requiring floating point result, need to be legalized
// to use the promoted float operand. Nodes that produce at least one