1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
3 ; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -passes='require<domtree>,loop(loop-simplifycfg)' -verify-loop-info -verify-dom-info -verify-loop-lcssa < %s | FileCheck %s
4 ; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -passes=loop-simplifycfg -verify-memoryssa -verify-loop-info -verify-dom-info -verify-loop-lcssa < %s | FileCheck %s
6 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
8 ; Make sure we update MSSA properly.
9 define void @test(ptr %a, ptr %b) {
16 %i = phi i32 [ 0, %entry ], [ %i.inc, %latch ]
20 switch i2 1, label %default [
33 %i.inc = add nsw i32 %i, 1
34 %exitcond = icmp eq i32 %i.inc, 4
35 br i1 %exitcond, label %exit, label %for.body