summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-02-06 08:43:11 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-02-06 08:43:11 +0000
commit044d1e0dcfae2ddf08e545598e8291047da405d8 (patch)
tree8453e10517637ac7ecad231221f34093f2528dea /llvm/test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll
parent5c31a4c9a3e86d952d1487b32d55ac526e4c8ee3 (diff)
downloadbcm5719-llvm-044d1e0dcfae2ddf08e545598e8291047da405d8.tar.gz
bcm5719-llvm-044d1e0dcfae2ddf08e545598e8291047da405d8.zip
[ArgPromote] Replace all the grep-based testing with precise FileCheck
tests. This also removes the use of instcombine as we can max the patterns produced by argument promotion directly with the more powerful tools in FileCheck. llvm-svn: 294174
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