[test] Update some legacy PM tests

This commit is contained in:
Arthur Eubanks 2022-09-30 11:30:46 -07:00
parent a80a888de5
commit e23aee7175
14 changed files with 33 additions and 130 deletions

View File

@ -1,10 +0,0 @@
; RUN: opt -debug-pass=Executions -globals-aa -function-attrs -disable-output < %s -enable-new-pm=0 2>&1 | FileCheck %s
; CHECK: Executing Pass 'Globals Alias Analysis'
; CHECK-NOT: Freeing Pass 'Globals Alias Analysis'
; CHECK: Executing Pass 'Deduce function attributes'
; CHECK: Freeing Pass 'Globals Alias Analysis'
define void @test(i8* %p) {
ret void
}

View File

@ -1,11 +1,5 @@
; RUN: opt -mtriple=amdgcn--amdhsa -disable-output -disable-verify -debug-pass=Structure -O2 %s -enable-new-pm=0 2>&1 | FileCheck -check-prefix=LPM %s
; RUN: opt -mtriple=amdgcn--amdhsa -disable-output -disable-verify -debug-pass-manager -passes='default<O2>' %s 2>&1 | FileCheck -check-prefix=NPM %s
; LPM: Function Integration/Inlining
; LPM: FunctionPass Manager
; LPM: Infer address spaces
; LPM: SROA
; NPM: Running pass: InlinerPass
; NPM: Running pass: InferAddressSpacesPass
; NPM: Running pass: SROA

View File

@ -1,4 +1,4 @@
; RUN: opt -S -function-attrs < %s -enable-new-pm=0 | FileCheck %s
; RUN: opt -S -passes=inferattrs,function-attrs < %s | FileCheck %s
declare void @f_readonly() readonly
declare void @f_readnone() readnone

View File

@ -1,5 +1,4 @@
; REQUIRES: x86-registered-target
; RUN: opt %s %loadbye -goodbye -wave-goodbye -disable-output -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt %s %loadnewpmbye %loadbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
; RUN: opt %s %loadnewpmbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
; RUN: opt -module-summary %s -o %t.o

View File

@ -1,47 +1,51 @@
; RUN: opt < %s -mergereturn -loop-extract -enable-new-pm=0 -S | FileCheck %s
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
; RUN: opt < %s -passes=loop-extract -S | FileCheck %s
; This test used to enter an infinite loop, until out of memory (PR3082).
define void @test() {
; CHECK-LABEL: define void @test()
; CHECK-NEXT: entry:
; CHECK-NEXT: br label %codeRepl
; CHECK: codeRepl:
; CHECK-NEXT: %targetBlock = call i1 @test.loopentry()
; CHECK-NEXT: br i1 %targetBlock, label %exit.1, label %exit.0
; CHECK: exit.0:
; CHECK-NEXT: br label %UnifiedReturnBlock
; CHECK: exit.1:
; CHECK-NEXT: br label %UnifiedReturnBlock
; CHECK: UnifiedReturnBlock:
; CHECK-NEXT: ret void
entry:
br label %loopentry
loopentry: ; preds = %loopexit, %entry
loopentry:
br i1 undef, label %exit.1, label %loopexit
loopexit: ; preds = %loopentry
loopexit:
br i1 undef, label %loopentry, label %exit.0
exit.0: ; preds = %loopexit
ret void
exit.0:
br label %unified
exit.1: ; preds = %loopentry
exit.1:
br label %unified
unified:
ret void
}
; CHECK-LABEL: define internal i1 @test.loopentry()
; CHECK-LABEL: define {{[^@]+}}@test() {
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[CODEREPL:%.*]]
; CHECK: codeRepl:
; CHECK-NEXT: [[TARGETBLOCK:%.*]] = call i1 @test.loopentry()
; CHECK-NEXT: br i1 [[TARGETBLOCK]], label [[EXIT_1:%.*]], label [[EXIT_0:%.*]]
; CHECK: exit.0:
; CHECK-NEXT: br label [[UNIFIED:%.*]]
; CHECK: exit.1:
; CHECK-NEXT: br label [[UNIFIED]]
; CHECK: unified:
; CHECK-NEXT: ret void
;
;
; CHECK-LABEL: define {{[^@]+}}@test.loopentry() {
; CHECK-NEXT: newFuncRoot:
; CHECK-NEXT: br label %loopentry
; CHECK-NEXT: br label [[LOOPENTRY:%.*]]
; CHECK: loopentry:
; CHECK-NEXT: br i1 true, label %exit.1.exitStub, label %loopexit
; CHECK-NEXT: br i1 undef, label [[EXIT_1_EXITSTUB:%.*]], label [[LOOPEXIT:%.*]]
; CHECK: loopexit:
; CHECK-NEXT: br i1 false, label %loopexit.loopentry_crit_edge, label %exit.0.exitStub
; CHECK: loopexit.loopentry_crit_edge:
; CHECK-NEXT: br label %loopentry
; CHECK-NEXT: br i1 undef, label [[LOOPENTRY]], label [[EXIT_0_EXITSTUB:%.*]]
; CHECK: exit.1.exitStub:
; CHECK-NEXT: ret i1 true
; CHECK: exit.0.exitStub:
; CHECK-NEXT: ret i1 false
;

View File

@ -1,5 +1,4 @@
; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -S < %s | FileCheck %s
; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -pgso -S < %s -enable-new-pm=0 | FileCheck %s -check-prefix=PGSO
; RUN: opt -mtriple=arm-arm-none-eabi -passes='require<profile-summary>,consthoist' -pgso -S < %s | FileCheck %s -check-prefix=PGSO
; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -pgso=false -S < %s | FileCheck %s -check-prefix=NPGSO

View File

@ -1,10 +1,6 @@
; This run line verifies that we get the expected constant fold.
; RUN: opt < %s -instcombine -S | FileCheck %s
; This run line verifies that InstructionCombiningPass::runOnFunction reports
; this as a modification of the IR.
; RUN: opt < %s -instcombine -disable-output -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=DETAILS
define i32 @foo(i32 %arg) #0 {
; CHECK-LABEL: @foo(
; CHECK-NEXT: entry:
@ -17,4 +13,3 @@ entry:
ret i32 %and
}
; DETAILS: Made Modification 'Combine redundant instructions' on Function 'foo'

View File

@ -1,28 +0,0 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instsimplify -S -o /dev/null -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck --check-prefix DETAILS %s
; RUN: opt < %s -instsimplify -S -o - | FileCheck %s
; Verify that InstSimplifyLegacyPass notifies the pass manager about changes
; being made (when a call is removed CGSCC must be updated).
;
; DETAILS: Made Modification 'Remove redundant instructions' on Function 'main'
define internal void @func_1(ptr nocapture readnone %0) #0 {
; CHECK-LABEL: @func_1(
; CHECK-NEXT: ret void
;
ret void
}
define i16 @main(i16 %0, ptr nocapture readnone %1) #1 {
; CHECK-LABEL: @main(
; CHECK-NEXT: bb1:
; CHECK-NEXT: unreachable
;
bb1:
call void @func_1(ptr undef)
unreachable
}
attributes #0 = { noinline norecurse nounwind readnone willreturn }
attributes #1 = { norecurse nounwind readnone }

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -loop-deletion -enable-new-pm=0 < %s | FileCheck %s
; RUN: opt -S -passes=loop-deletion < %s | FileCheck %s
; Make sure this does not crash due to incorrect SCEV invalidation (PR49967).

View File

@ -1,4 +1,3 @@
; RUN: opt -Oz -S -enable-new-pm=0 < %s | FileCheck %s
; RUN: opt -passes='default<Oz>' -S < %s | FileCheck %s
; Forcing vectorization should allow for more aggressive loop-rotation with

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -instcombine -attributor-cgscc -print-callgraph -disable-output -verify 2>&1 -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='function(instcombine),cgscc(attributor-cgscc),print-callgraph' -disable-output 2>&1 | FileCheck %s
; CHECK: Call graph node <<null function>><<{{.*}}>> #uses=0
; CHECK: CS<None> calls function 'dead_fork_call'

View File

@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -scoped-noalias-aa -slp-vectorizer -mtriple=arm64-apple-darwin -enable-new-pm=false -S %s | FileCheck %s
; RUN: opt -aa-pipeline='basic-aa,scoped-noalias-aa' -passes=slp-vectorizer -mtriple=arm64-apple-darwin -S %s | FileCheck %s
define void @needs_versioning_not_profitable(i32* %dst, i32* %src) {

View File

@ -1,9 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s
;; Check the report from the pass manager, telling us whether simplifycfg
;; reported the "changed" status correctly:
; CHECK: Made Modification 'Simplify the CFG' on Function 'wibble'...
; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 2>&1 | FileCheck %s
declare i32 @blam(i8*, i32)

View File

@ -1,44 +0,0 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -loop-sink -break-crit-edges -branch-prob -S -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S -enable-new-pm=0 | FileCheck %s
; BreakCriticalEdges tries to update LI and DT if they are present. However,
; updating LI actually needs a DT, so we now require DT in
; BranchProbabilityInfo/LazyBlockFrequencyInfo/LazyBranchProbabilityInfo so it
; is indeed available when LI is.
target triple = "x86_64-unknown-linux-gnu"
define void @f1() {
; CHECK-LABEL: @f1(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[FOR_COND:%.*]]
; CHECK: for.cond:
; CHECK-NEXT: br i1 false, label [[FOR_BODY:%.*]], label [[FOR_COND_FOR_END_CRIT_EDGE:%.*]]
; CHECK: for.cond.for.end_crit_edge:
; CHECK-NEXT: br label [[FOR_END:%.*]]
; CHECK: for.body:
; CHECK-NEXT: br i1 true, label [[FOR_ENDSPLIT:%.*]], label [[FOR_INC:%.*]]
; CHECK: for.inc:
; CHECK-NEXT: br label [[FOR_COND]]
; CHECK: for.endsplit:
; CHECK-NEXT: br label [[FOR_END]]
; CHECK: for.end:
; CHECK-NEXT: ret void
;
entry:
br label %for.cond
for.cond: ; preds = %for.inc, %entry
br i1 undef, label %for.body, label %for.end
for.body: ; preds = %for.cond
br i1 undef, label %for.end, label %for.inc
for.inc: ; preds = %for.body
br label %for.cond
for.end: ; preds = %for.body, %for.cond
ret void
}