Skip to content

Commit 8df17b4

Browse files
committed
[test][InstCombine][NewPM] Fix InstCombine tests under NPM
Some of these depended on analyses being present that aren't provided automatically in NPM. early_dce_clobbers_callgraph.ll was previously inlining a noinline function? cast-call-combine.ll relied on the legacy always-inline pass being a CGSCC pass and getting rerun. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D88187
1 parent 61d4b34 commit 8df17b4

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

llvm/test/Transforms/InstCombine/cast-call-combine.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -always-inline -instcombine -S | FileCheck %s
1+
; RUN: opt < %s -instcombine -always-inline -S | FileCheck %s
22

33
define internal void @foo(i16*) alwaysinline {
44
ret void

llvm/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
; no longer used function 'bar' (due to incorrect reference
1212
; count in the CallGraph).
1313

14-
attributes #0 = { noinline norecurse nounwind readnone }
15-
16-
define void @foo() #0 {
14+
define void @foo() {
1715
; CHECK-LABEL: @foo(
1816
; CHECK-NEXT: entry:
1917
; CHECK-NEXT: ret void
@@ -23,7 +21,7 @@ entry:
2321
ret void
2422
}
2523

26-
define internal i32 @bar() #0 {
24+
define internal i32 @bar() {
2725
; CHECK-NOT: bar
2826
entry:
2927
ret i32 42

llvm/test/Transforms/InstCombine/fputs-opt-size.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
; because it requires more arguments and thus extra MOVs are required.
33
;
44
; RUN: opt < %s -instcombine -S | FileCheck %s
5-
; RUN: opt < %s -instcombine -pgso -S | FileCheck %s -check-prefix=PGSO
5+
; RUN: opt < %s -instcombine -pgso -S -enable-new-pm=0 | FileCheck %s -check-prefix=PGSO
6+
; RUN: opt < %s -passes='require<profile-summary>,function(instcombine)' -pgso -S | FileCheck %s -check-prefix=PGSO
67
; RUN: opt < %s -instcombine -pgso=false -S | FileCheck %s -check-prefix=NPGSO
78

89
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }

llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -instcombine -S | FileCheck %s
2+
; RUN: opt < %s -instcombine -S -enable-new-pm=0 | FileCheck %s
3+
; RUN: opt < %s -passes='require<loops>,instcombine' -S | FileCheck %s
34
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
45
target triple = "x86_64-unknown-linux-gnu"
56

llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -disable-output -branch-prob -instcombine -block-freq -verify-dom-info
2-
; RUN: opt < %s -postdomtree -analyze | FileCheck --check-prefixes=CHECK-POSTDOM %s
2+
; RUN: opt < %s -postdomtree -analyze -enable-new-pm=0 | FileCheck --check-prefixes=CHECK-POSTDOM %s
33
; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck --check-prefixes=CHECK-POSTDOM %s
44

55
; Demonstrate that Predicate Canonicalization (InstCombine) does not invalidate PostDomTree

0 commit comments

Comments
 (0)