summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll')
-rw-r--r--llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll25
1 files changed, 15 insertions, 10 deletions
diff --git a/llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll b/llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll
index 267a6c04597..fac84d092df 100644
--- a/llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll
@@ -1,25 +1,30 @@
-; RUN: opt < %s -argpromotion -S > %t
-; RUN: cat %t | grep "define.*@callee(.*i32\*"
+; RUN: opt < %s -argpromotion -S | FileCheck %s
; PR2498
; This test tries to convince argpromotion about promoting the load from %A + 2,
; because there is a load of %A in the entry block
define internal i32 @callee(i1 %C, i32* %A) {
+; CHECK-LABEL: define internal i32 @callee(
+; CHECK: i1 %C, i32* %A)
entry:
- ; Unconditonally load the element at %A
- %A.0 = load i32, i32* %A
- br i1 %C, label %T, label %F
+ ; Unconditonally load the element at %A
+ %A.0 = load i32, i32* %A
+ br i1 %C, label %T, label %F
+
T:
- ret i32 %A.0
+ ret i32 %A.0
+
F:
- ; Load the element at offset two from %A. This should not be promoted!
- %A.2 = getelementptr i32, i32* %A, i32 2
- %R = load i32, i32* %A.2
- ret i32 %R
+ ; Load the element at offset two from %A. This should not be promoted!
+ %A.2 = getelementptr i32, i32* %A, i32 2
+ %R = load i32, i32* %A.2
+ ret i32 %R
}
define i32 @foo() {
+; CHECK-LABEL: define i32 @foo
%X = call i32 @callee(i1 false, i32* null) ; <i32> [#uses=1]
+; CHECK: call i32 @callee(i1 false, i32* null)
ret i32 %X
}
OpenPOWER on IntegriCloud