Eliminate uses of %prcontext.

- I'd appreciate it if someone else eyeballs my changes to make sure I captured
   the intent of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-09-05 11:35:16 +00:00
parent 8c042c2337
commit 31ab6e3364
16 changed files with 67 additions and 27 deletions

View File

@@ -1,6 +1,4 @@
; RUN: llvm-as < %s | opt -gvn -enable-load-pre | llvm-dis > %t
; RUN: %prcontext bb1: 2 < %t | grep phi
; RUN: %prcontext bb1: 2 < %t | not grep load
; RUN: opt -S -gvn -enable-load-pre %s | FileCheck %s
;
; The partially redundant load in bb1 should be hoisted to "bb". This comes
; from this C code (GCC PR 23455):
@@ -30,6 +28,9 @@ bb: ; preds = %entry
br label %bb1
bb1: ; preds = %bb, %entry
; CHECK: bb1:
; CHECK-NEXT: phi
; CHECK-NEXT: getelementptr
%4 = load i32* @outcnt, align 4 ; <i32> [#uses=1]
%5 = getelementptr i8* %outbuf, i32 %4 ; <i8*> [#uses=1]
store i8 %bi_buf, i8* %5, align 1

View File

@@ -1,6 +1,4 @@
; RUN: llvm-as < %s | opt -gvn -enable-load-pre | llvm-dis > %t
; RUN: %prcontext bb3.backedge: 2 < %t | grep phi
; RUN: %prcontext bb3.backedge: 2 < %t | not grep load
; RUN: opt -S -gvn -enable-load-pre %s | FileCheck %s
;
; Make sure the load in bb3.backedge is removed and moved into bb1 after the
; call. This makes the non-call case faster.
@@ -43,6 +41,9 @@ bb1: ; preds = %bb
br label %bb3.backedge
bb3.backedge: ; preds = %bb, %bb1
; CHECK: bb3.backedge:
; CHECK-NEXT: phi
; CHECK-NEXT: icmp
%7 = load i32* %0, align 4 ; <i32> [#uses=2]
%8 = icmp eq i32 %7, 0 ; <i1> [#uses=1]
br i1 %8, label %return, label %bb