Files
clang-p2996/llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
Alina Sbirlea bf9fe79397 SCEV should forget all loops containing a deleted block.
Summary:
LoopSimplifyCFG should update ScEv for all loops after a block is deleted.
If the deleted block "Succ" is part of L, then it is part of all parent loops, so forget topmost loop.

Reviewers: greened, mkazantsev, sanjoy

Subscribers: jlebar, javed.absar, uabelho, llvm-commits

Differential Revision: https://reviews.llvm.org/D50422

llvm-svn: 339363
2018-08-09 17:53:26 +00:00

26 lines
716 B
LLVM

; RUN: opt -S -indvars -loop-idiom -verify -loop-simplifycfg -loop-idiom < %s | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
; CHECK-LABEL: @f1()
; CHECK-NEXT: entry:
define void @f1() {
entry:
br label %lbl1
lbl1: ; preds = %if.end, %entry
br label %for
for: ; preds = %if.end, %lbl1
br label %lor.end
lor.end: ; preds = %for
br i1 undef, label %for.end, label %if.end
if.end: ; preds = %lor.end
br i1 undef, label %lbl1, label %for
for.end: ; preds = %lor.end
ret void
}