Skip to content

Commit

Permalink
NewGVN: Update a number of xfailed tests to either be correct or note
Browse files Browse the repository at this point in the history
why they fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294928 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dberlin committed Feb 12, 2017
1 parent f957e0d commit 583dfa9
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 33 deletions.
45 changes: 21 additions & 24 deletions test/Transforms/NewGVN/2007-07-26-PhiErasure.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; XFAIL: *
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -newgvn -S | FileCheck %s

%struct..0anon = type { i32 }
Expand All @@ -9,37 +9,34 @@
@n_spills = external global i32 ; <i32*> [#uses=2]

define i32 @reload(%struct.rtx_def* %first, i32 %global, %struct.FILE* %dumpfile) {
; CHECK-LABEL: @reload(
; CHECK-NEXT: cond_next2835.1:
; CHECK-NEXT: br label [[BB2928:%.*]]
; CHECK: bb2928:
; CHECK-NEXT: br i1 false, label [[COND_NEXT2943:%.*]], label [[COND_TRUE2935:%.*]]
; CHECK: cond_true2935:
; CHECK-NEXT: br label [[COND_NEXT2943]]
; CHECK: cond_next2943:
; CHECK-NEXT: br i1 false, label [[BB2982_PREHEADER:%.*]], label [[BB2928]]
; CHECK: bb2982.preheader:
; CHECK-NEXT: store i8 undef, i8* null
; CHECK-NEXT: ret i32 undef
;
cond_next2835.1: ; preds = %cond_next2861
%tmp2922 = load i32, i32* @n_spills, align 4 ; <i32> [#uses=0]
br label %bb2928
%tmp2922 = load i32, i32* @n_spills, align 4 ; <i32> [#uses=0]
br label %bb2928

bb2928: ; preds = %cond_next2835.1, %cond_next2943
br i1 false, label %cond_next2943, label %cond_true2935
br i1 false, label %cond_next2943, label %cond_true2935

cond_true2935: ; preds = %bb2928
br label %cond_next2943
br label %cond_next2943

cond_next2943: ; preds = %cond_true2935, %bb2928
br i1 false, label %bb2982.preheader, label %bb2928
br i1 false, label %bb2982.preheader, label %bb2928

bb2982.preheader: ; preds = %cond_next2943
%tmp298316 = load i32, i32* @n_spills, align 4 ; <i32> [#uses=0]
ret i32 %tmp298316
%tmp298316 = load i32, i32* @n_spills, align 4 ; <i32> [#uses=0]
ret i32 %tmp298316

}

; CHECK: define i32 @reload(%struct.rtx_def* %first, i32 %global, %struct.FILE* %dumpfile) {
; CHECK-NEXT: cond_next2835.1:
; CHECK-NEXT: br label %bb2928
; CHECK: bb2928:
; CHECK-NEXT: br i1 false, label %bb2928.cond_next2943_crit_edge, label %cond_true2935
; CHECK: bb2928.cond_next2943_crit_edge:
; CHECK-NEXT: br label %cond_next2943
; CHECK: cond_true2935:
; CHECK-NEXT: br label %cond_next2943
; CHECK: cond_next2943:
; CHECK-NEXT: br i1 false, label %bb2982.preheader, label %bb2928
; CHECK: bb2982.preheader:
; CHECK-NEXT: %tmp298316 = load i32, i32* @n_spills, align 4
; CHECK-NEXT: ret i32 %tmp298316
; CHECK-NEXT: }
18 changes: 12 additions & 6 deletions test/Transforms/NewGVN/bitcast-of-call.ll
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
; XFAIL: *
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -newgvn -S | FileCheck %s
; PR2213

define i32* @f(i8* %x) {
; CHECK-LABEL: @f(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[TMP:%.*]] = call i8* @m(i32 12)
; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[TMP]] to i32*
; CHECK-NEXT: ret i32* [[TMP1]]
;
entry:
%tmp = call i8* @m( i32 12 ) ; <i8*> [#uses=2]
%tmp1 = bitcast i8* %tmp to i32* ; <i32*> [#uses=0]
%tmp2 = bitcast i8* %tmp to i32* ; <i32*> [#uses=0]
; CHECK-NOT: %tmp2
ret i32* %tmp2
%tmp = call i8* @m( i32 12 ) ; <i8*> [#uses=2]
%tmp1 = bitcast i8* %tmp to i32* ; <i32*> [#uses=0]
%tmp3 = bitcast i32* %tmp1 to i8*
%tmp2 = bitcast i8* %tmp3 to i32* ; <i32*> [#uses=0]
ret i32* %tmp2
}

declare i8* @m(i32)
2 changes: 2 additions & 0 deletions test/Transforms/NewGVN/calls-nonlocal.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
; XFAIL: *
;; NewGVN zaps the strlens, but currently takes two iterations to evaluate the conditions, because
;; we prune predicateinfo, and the icmps only become equivalent after the strlens are zapped
; Two occurrences of strlen should be zapped.
; RUN: opt < %s -basicaa -newgvn -S | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
Expand Down
2 changes: 1 addition & 1 deletion test/Transforms/NewGVN/fold-const-expr.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
; This test checks that we are folding constant expression
; PR 28418
; RUN: opt -newgvn -S < %s | FileCheck %s

;; NewGVN fails this due to not having load coercion
%2 = type { i32, i32, i32, i32, i32 }
define i32 @_Z16vector3util_mainv(i32 %x, i32 %y) {
%tmp1 = alloca %2, align 4
Expand Down
2 changes: 1 addition & 1 deletion test/Transforms/NewGVN/pr10820.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; XFAIL: *
; RUN: opt < %s -basicaa -newgvn -S | FileCheck %s

; NewGVN fails this due to missing load coercion
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-f128:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
Expand Down
1 change: 1 addition & 0 deletions test/Transforms/NewGVN/pr14166.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; XFAIL: *
; RUN: opt -disable-basicaa -newgvn -S < %s | FileCheck %s
; NewGVN fails this due to missing load coercion
target datalayout = "e-p:32:32:32"
target triple = "i386-pc-linux-gnu"
define <2 x i32> @test1() {
Expand Down
2 changes: 1 addition & 1 deletion test/Transforms/NewGVN/pr17732.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; XFAIL: *
; RUN: opt -newgvn -S -o - < %s | FileCheck %s

; NewGVN fails this due to missing load coercion
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

Expand Down

0 comments on commit 583dfa9

Please sign in to comment.