[PATCH] D28187: [selectiondag] Check PromotedFloats map during expansive checks.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 15:34:06 PST 2016


fhahn created this revision.
fhahn added reviewers: baldrick, bogner.
fhahn added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.

`PromotedFloats` needs to be checked in 
`DAGTypeLegalizer::PerformExpensiveChecks`. This patch fixes a few type
legalization failures with expansive checks for ARM fp16 tests.

      

This patch is missing a test, but I do not know how to test the expansive check
in a unit test.


https://reviews.llvm.org/D28187

Files:
  lib/CodeGen/SelectionDAG/LegalizeTypes.cpp


Index: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -117,6 +117,8 @@
         Mapped |= 64;
       if (WidenedVectors.find(Res) != WidenedVectors.end())
         Mapped |= 128;
+      if (PromotedFloats.find(Res) != PromotedFloats.end())
+        Mapped |= 256;
 
       if (Node.getNodeId() != Processed) {
         // Since we allow ReplacedValues to map deleted nodes, it may map nodes
@@ -159,6 +161,8 @@
           dbgs() << " SplitVectors";
         if (Mapped & 128)
           dbgs() << " WidenedVectors";
+        if (Mapped & 256)
+          dbgs() << " PromotedFloats";
         dbgs() << "\n";
         llvm_unreachable(nullptr);
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28187.82748.patch
Type: text/x-patch
Size: 814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161230/1f7281b7/attachment.bin>


More information about the llvm-commits mailing list