[PATCH] D34640: Create a PHI value when merging with a known undef live-in

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 14:31:05 PDT 2017


kparzysz added inline comments.


================
Comment at: lib/CodeGen/LiveRangeCalc.cpp:500-501
         // Cache the DomTree node that defined the value.
-        if (IDomValue.first && !IDomValue.second)
-          Map[IDom->getBlock()].second = IDomValue.second =
-            DomTree->getNode(Indexes->getMBBFromIndex(IDomValue.first->def));
+        if (IDomValue.first && IDomValue.first != &UndefVNI)
+          if (!IDomValue.second)
+            Map[IDom->getBlock()].second = IDomValue.second =
----------------
MatzeB wrote:
> This can be `&&` instead of a nested if.
But then the condition wouldn't fit in a single line.


Repository:
  rL LLVM

https://reviews.llvm.org/D34640





More information about the llvm-commits mailing list