aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.cc
diff options
context:
space:
mode:
authorPranil Dey <mkdeyp@gmail.com>2024-09-30 19:03:42 +0530
committerPranil Dey <mkdeyp@gmail.com>2024-09-30 19:03:42 +0530
commitb602de4ed9f872aa2a07e8cf74d5b3c8446de221 (patch)
tree0d1fa6e4793d0a240fee8b958764cb93fc837aab /gcc/tree-loop-distribution.cc
parentc16d4a0ae162abc00d97bb73e598ca00d16cf555 (diff)
parent87905f63a6521eef1f38082e2368e18c637ef092 (diff)
downloadgcc-b602de4ed9f872aa2a07e8cf74d5b3c8446de221.zip
gcc-b602de4ed9f872aa2a07e8cf74d5b3c8446de221.tar.gz
gcc-b602de4ed9f872aa2a07e8cf74d5b3c8446de221.tar.bz2
Merge branch 'master' of git+ssh://gcc.gnu.org/git/gcc into devel/nothrow-detection
Diffstat (limited to 'gcc/tree-loop-distribution.cc')
-rw-r--r--gcc/tree-loop-distribution.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc
index f87393e..f0430ed 100644
--- a/gcc/tree-loop-distribution.cc
+++ b/gcc/tree-loop-distribution.cc
@@ -90,6 +90,7 @@ along with GCC; see the file COPYING3. If not see
data reuse. */
#include "config.h"
+#define INCLUDE_MEMORY
#include "system.h"
#include "coretypes.h"
#include "backend.h"
@@ -980,6 +981,9 @@ copy_loop_before (class loop *loop, bool redirect_lc_phi_defs)
if (TREE_CODE (USE_FROM_PTR (use_p)) == SSA_NAME)
{
tree new_def = get_current_def (USE_FROM_PTR (use_p));
+ if (!new_def)
+ /* Something defined outside of the loop. */
+ continue;
SET_USE (use_p, new_def);
}
}