From 7025264addb5eed5af99ed8e6aaa022f80ef3fa4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 30 Aug 2009 22:08:19 +0000 Subject: [PATCH] convert scalar_promote to filecheck style and merge 2003-12-13-VolatilePromote.ll into it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80521 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../LICM/2003-12-13-VolatilePromote.ll | 16 ------ test/Transforms/LICM/scalar_promote.ll | 52 ++++++++++++++++--- 2 files changed, 45 insertions(+), 23 deletions(-) delete mode 100644 test/Transforms/LICM/2003-12-13-VolatilePromote.ll diff --git a/test/Transforms/LICM/2003-12-13-VolatilePromote.ll b/test/Transforms/LICM/2003-12-13-VolatilePromote.ll deleted file mode 100644 index 85c93c62bf5..00000000000 --- a/test/Transforms/LICM/2003-12-13-VolatilePromote.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: llvm-as < %s | opt -licm | llvm-dis | %prcontext volatile 1 | grep Loop - -@X = global i32 7 ; [#uses=2] - -define void @testfunc(i32 %i) { - br label %Loop -Loop: ; preds = %Loop, %0 - ; Should not promote this to a register - %x = volatile load i32* @X ; [#uses=1] - %x2 = add i32 %x, 1 ; [#uses=1] - store i32 %x2, i32* @X - br i1 true, label %Out, label %Loop -Out: ; preds = %Loop - ret void -} - diff --git a/test/Transforms/LICM/scalar_promote.ll b/test/Transforms/LICM/scalar_promote.ll index f6c0f0821a3..8f00d033212 100644 --- a/test/Transforms/LICM/scalar_promote.ll +++ b/test/Transforms/LICM/scalar_promote.ll @@ -1,13 +1,17 @@ -; RUN: llvm-as < %s | opt -licm -disable-output -stats |& \ -; RUN: grep {memory locations promoted to register} +; RUN: llvm-as < %s | opt -licm | llvm-dis | FileCheck %s @X = global i32 7 ; [#uses=4] -define void @testfunc(i32 %i) { -;