summaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-10-13 14:04:21 +0000
committerDaniel Jasper <djasper@google.com>2017-10-13 14:04:21 +0000
commite9712285e9e1c3cfd22b552eeab23b394e64e719 (patch)
tree0c23bc2403a782364adaef81459b2bcb09455539 /test/Analysis
parenta0af046f39828a5797011f70c31bd36d8a2b19bb (diff)
Revert r314923: "Recommit : Use the basic cost if a GEP is not used as addressing mode"
Significantly reduces performancei (~30%) of gipfeli (https://github.com/google/gipfeli) I have not yet managed to reproduce this regression with the open-source version of the benchmark on github, but will work with others to get a reproducer to you later today. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/CostModel/AArch64/gep.ll46
-rw-r--r--test/Analysis/CostModel/X86/vector_gep.ll2
2 files changed, 1 insertions, 47 deletions
diff --git a/test/Analysis/CostModel/AArch64/gep.ll b/test/Analysis/CostModel/AArch64/gep.ll
index 594be51f91c..08bfc3d2123 100644
--- a/test/Analysis/CostModel/AArch64/gep.ll
+++ b/test/Analysis/CostModel/AArch64/gep.ll
@@ -290,49 +290,3 @@ define i64 @test36(i64* %p) {
%v = load i64, i64* %a
ret i64 %v
}
-
-; CHECK-LABEL: test37
-; CHECK: cost of 1 for instruction: {{.*}} = getelementptr inbounds i8*, i8**
-define i8 @test37(i64 %j, i8** readonly %P) {
-entry:
- %arrayidx0 = getelementptr inbounds i8*, i8** %P, i64 %j
- %l1 = call i8* @func(i8** %arrayidx0)
- ret i8 0
-}
-
-; CHECK-LABEL: test38
-; CHECK: cost of 1 for instruction: {{.*}} = getelementptr inbounds i8*, i8**
-define i8 @test38(i8** readonly %P) {
-entry:
- %arrayidx0 = getelementptr inbounds i8*, i8** %P, i64 10
- %l1 = call i8* @func(i8** %arrayidx0)
- ret i8 0
-}
-
-; CHECK-LABEL:test39
-; CHECK: cost of 0 for instruction: {{.*}} = getelementptr inbounds i8*, i8**
-define i8 @test39(i8** readonly %P) {
-entry:
- %arrayidx0 = getelementptr inbounds i8*, i8** %P, i64 0
- %l1 = call i8* @func(i8** %arrayidx0)
- ret i8 0
-}
-
-; CHECK-LABEL:test40
-; CHECK: cost of 1 for instruction: {{.*}} = getelementptr inbounds i8*, i8**
-define i8** @test40(i8** readonly %P) {
-entry:
- %arrayidx0 = getelementptr inbounds i8*, i8** %P, i64 10
- ret i8** %arrayidx0
-}
-
-; CHECK-LABEL:test41
-; CHECK: cost of 1 for instruction: {{.*}} = getelementptr inbounds i8, i8*
-define i8 @test41(i8* %V, i8** readonly %P) {
-entry:
- %arrayidx0 = getelementptr inbounds i8, i8* %V, i64 10
- store i8* %arrayidx0, i8** %P
- ret i8 0
-}
-
-declare i8* @func(i8**)
diff --git a/test/Analysis/CostModel/X86/vector_gep.ll b/test/Analysis/CostModel/X86/vector_gep.ll
index 5c00512ba34..17f70dfc7a7 100644
--- a/test/Analysis/CostModel/X86/vector_gep.ll
+++ b/test/Analysis/CostModel/X86/vector_gep.ll
@@ -10,7 +10,7 @@ define <4 x i32> @foov(<4 x %struct.S*> %s, i64 %base){
%vector = shufflevector <4 x i64> %temp, <4 x i64> undef, <4 x i32> zeroinitializer
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds %struct.S
%B = getelementptr inbounds %struct.S, <4 x %struct.S*> %s, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer
-;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds [1000 x i32]
+;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds [1000 x i32]
%arrayidx = getelementptr inbounds [1000 x i32], <4 x [1000 x i32]*> %B, <4 x i64> zeroinitializer, <4 x i64> %vector
%res = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %arrayidx, i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef)
ret <4 x i32> %res