[PATCH] D46750: [SROA] pr37267: fix assertion failure while integer widening

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 15:34:55 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/SROA.cpp:1994
+    // We can't handle split slice tails.
+    if (RelBegin < 0)
+      return false;
----------------
Why does this check belong here, as opposed to the beginning of the function or somewhere in isIntegerWideningViable()?


================
Comment at: test/Transforms/SROA/pr37267.ll:6
+; PR37267
+; Check that we don't crash on this test.
+
----------------
Please add FileCheck lines to show how we split the alloca. A test like this doesn't really make it clear what you're expecting to happen instead of crashing.


https://reviews.llvm.org/D46750





More information about the llvm-commits mailing list