summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-12-31 14:04:09 -0800
committerCraig Topper <craig.topper@intel.com>2019-12-31 15:04:12 -0800
commit4ae3120ed81cb2f1f73f59a52e2a9965515ea6bf (patch)
tree069bfa7dbf471c2c09b49ba2a5f44de030841e92 /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
parent64cf26548a4cef7745ebc385ac6a2d280bcaf6fe (diff)
downloadbcm5719-llvm-4ae3120ed81cb2f1f73f59a52e2a9965515ea6bf.tar.gz
bcm5719-llvm-4ae3120ed81cb2f1f73f59a52e2a9965515ea6bf.zip
[LegalizeVectorOps][AArch64] Stop asking for v4f16 fp_round and fp_extend to be promoted.
These operations are needed as building blocks for promoting so they can't be promoted themselves. This appeared to work because the fp_extend query type for operation actions is the result type, not the input type so it never triggered in the legalizer. For fp_round, the vector op legalizer just ended up creating a nop fp_extend that was elided by getNode, followed by a nop fp_round that was also elided by getNode. This was followed by a final fp_round from v4f32 back to vf416 which was CSEd to the original node. Then legalize vector ops just believed that node legalized to itself. LegalizeDAG took another crack at promoting it, but didn't have a handler so just skipped it with a debug message saying it wasn't promoted. This patch just removes the operation actions to avoid this non-sense. Found while trying to refactor LegalizeVectorOps to handle multiple result nodes better.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
index dcfa1e78d86..5d76aeb0799 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
@@ -512,6 +512,11 @@ SDValue VectorLegalizer::Promote(SDValue Op) {
case ISD::STRICT_FP_TO_SINT:
// Promote the operation by extending the operand.
return PromoteFP_TO_INT(Op);
+ case ISD::FP_ROUND:
+ case ISD::FP_EXTEND:
+ // These operations are used to do promotion so they can't be promoted
+ // themselves.
+ llvm_unreachable("Don't know how to promote this operation!");
}
// There are currently two cases of vector promotion:
OpenPOWER on IntegriCloud