From: Quentin Colombet Date: Tue, 15 Sep 2015 18:51:43 +0000 (+0000) Subject: [ShrinkWrapping] Add a test case for r247710. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=bd22a1dc62c9bee595442d8f8a1b1fa123f8f7f4 [ShrinkWrapping] Add a test case for r247710. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247713 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/x86-shrink-wrapping.ll b/test/CodeGen/X86/x86-shrink-wrapping.ll index 9cfbf772bb3..ae9816f2fdc 100644 --- a/test/CodeGen/X86/x86-shrink-wrapping.ll +++ b/test/CodeGen/X86/x86-shrink-wrapping.ll @@ -667,3 +667,33 @@ for.body: ; preds = %for.body, %entry if.end: ret void } + +; Another infinite loop test this time with a body bigger than just one block. +; CHECK-LABEL: infiniteloop2 +; CHECK: retq +define void @infiniteloop2() { +entry: + br i1 undef, label %if.then, label %if.end + +if.then: + %ptr = alloca i32, i32 4 + br label %for.body + +for.body: ; preds = %for.body, %entry + %sum.03 = phi i32 [ 0, %if.then ], [ %add, %body1 ], [ 1, %body2] + %call = tail call i32 asm "movl $$1, $0", "=r,~{ebx}"() + %add = add nsw i32 %call, %sum.03 + store i32 %add, i32* %ptr + br i1 undef, label %body1, label %body2 + +body1: + tail call void asm sideeffect "nop", "~{ebx}"() + br label %for.body + +body2: + tail call void asm sideeffect "nop", "~{ebx}"() + br label %for.body + +if.end: + ret void +}