[PATCH] D29180: Fix implementation of DAGTypeLegalizer::PerformExpensiveChecks

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 05:37:22 PST 2017


sepavloff updated this revision to Diff 86272.
sepavloff added a comment.

Remove changes that relates to intersection of `ReplacedValues` and `SoftenedFloats`.

They are covered by https://reviews.llvm.org/D29265.


https://reviews.llvm.org/D29180

Files:
  lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  test/CodeGen/ARM/fp16.ll


Index: test/CodeGen/ARM/fp16.ll
===================================================================
--- test/CodeGen/ARM/fp16.ll
+++ test/CodeGen/ARM/fp16.ll
@@ -2,7 +2,7 @@
 ; RUN: llc -mtriple=armv7a--none-gnueabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HARDFLOAT-GNU %s
 ; RUN: llc -mtriple=armv7a--none-musleabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HARDFLOAT-GNU %s
 ; RUN: llc -mtriple=armv8-eabihf < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-ARMV8 %s
-; RUN: llc -mtriple=thumbv7m-eabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-EABI %s
+; RUN: llc -mtriple=thumbv7m-eabi -enable-legalize-types-checking < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-EABI %s
 ; RUN: llc -mtriple=thumbv7m-gnueabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-GNU %s
 ; RUN: llc -mtriple=thumbv7m-musleabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-GNU %s
 
Index: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -124,7 +124,9 @@
         // Since we allow ReplacedValues to map deleted nodes, it may map nodes
         // marked NewNode too, since a deleted node may have been reallocated as
         // another node that has not been seen by the LegalizeTypes machinery.
-        if ((Node.getNodeId() == NewNode && Mapped > 1) ||
+        // Treatment of SoftenedFloats may also create nodes that are abandoned
+        // latter.
+        if ((Node.getNodeId() == NewNode && Mapped > 1 && Mapped != 4) ||
             (Node.getNodeId() != NewNode && Mapped != 0)) {
           dbgs() << "Unprocessed value in a map!";
           Failed = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29180.86272.patch
Type: text/x-patch
Size: 1850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170130/6dd833fc/attachment.bin>


More information about the llvm-commits mailing list