[PATCH] D22336: [SCCP] zap multiple return values

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 22:54:40 PDT 2016


eli.friedman added inline comments.

================
Comment at: lib/Transforms/Scalar/SCCP.cpp:1908
@@ +1907,3 @@
+           "The return type should be a struct");
+    if (StructType *STy = dyn_cast<StructType>(F->getReturnType())) {
+      for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) {
----------------
Given the isStructTy assert, can you just use cast<> here?

================
Comment at: lib/Transforms/Scalar/SCCP.cpp:1914
@@ +1913,3 @@
+        if (LV.isOverdefined())
+          continue;
+      }
----------------
If this actually passes make check, we need more tests.  (There are two loops here.)


http://reviews.llvm.org/D22336





More information about the llvm-commits mailing list