52 lines · plain
1; RUN: opt -verify-memoryssa -passes='loop-mssa(loop-rotate)' -S %s | FileCheck %s2; REQUIRES: asserts3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-grtev4-linux-gnu"6 7; Check verification passes after loop rotate, when adding phis in blocks8; receiving incoming edges and adding phis in IDF blocks.9; CHECK-LABEL: @f10define void @f(i1 %arg) align 32 {11entry:12 br label %while.cond.outer13 14while.cond80.while.cond.loopexit_crit_edge: ; preds = %if.else9915 br label %while.cond.outer16 17while.cond.outer: ; preds = %while.cond80.while.cond.loopexit_crit_edge, %entry18 br i1 %arg, label %while.cond.outer.return.loopexit2_crit_edge, label %while.body.lr.ph19 20while.body.lr.ph: ; preds = %while.cond.outer21 br label %while.body22 23while.body: ; preds = %while.body.lr.ph24 br i1 %arg, label %if.then42, label %if.end6125 26if.then42: ; preds = %while.body27 br label %return.loopexit228 29if.end61: ; preds = %while.body30 br label %while.body8231 32while.body82: ; preds = %if.end6133 br i1 %arg, label %return.loopexit, label %if.else9934 35if.else99: ; preds = %while.body8236 store i32 0, ptr inttoptr (i64 44 to ptr), align 437 br label %while.cond80.while.cond.loopexit_crit_edge38 39return.loopexit: ; preds = %while.body8240 br label %return41 42while.cond.outer.return.loopexit2_crit_edge: ; preds = %while.cond.outer43 br label %return.loopexit244 45return.loopexit2: ; preds = %while.cond.outer.return.loopexit2_crit_edge, %if.then4246 br label %return47 48return: ; preds = %return.loopexit2, %return.loopexit49 ret void50}51 52