[llvm] 8df17b4 - [test][InstCombine][NewPM] Fix InstCombine tests under NPM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 07:40:36 PDT 2020


Author: Arthur Eubanks
Date: 2020-10-06T07:39:00-07:00
New Revision: 8df17b4dc12292cd7adc9c46a5bd75b8db26d49e

URL: https://github.com/llvm/llvm-project/commit/8df17b4dc12292cd7adc9c46a5bd75b8db26d49e
DIFF: https://github.com/llvm/llvm-project/commit/8df17b4dc12292cd7adc9c46a5bd75b8db26d49e.diff

LOG: [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

Added: 
    

Modified: 
    llvm/test/Transforms/InstCombine/cast-call-combine.ll
    llvm/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll
    llvm/test/Transforms/InstCombine/fputs-opt-size.ll
    llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
    llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/cast-call-combine.ll b/llvm/test/Transforms/InstCombine/cast-call-combine.ll
index be70a8763ea8..bf70811b6c4b 100644
--- a/llvm/test/Transforms/InstCombine/cast-call-combine.ll
+++ b/llvm/test/Transforms/InstCombine/cast-call-combine.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -always-inline -instcombine -S | FileCheck %s
+; RUN: opt < %s -instcombine -always-inline -S | FileCheck %s
 
 define internal void @foo(i16*) alwaysinline {
   ret void

diff  --git a/llvm/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll b/llvm/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll
index 743477621fa1..01b72f6ab201 100644
--- a/llvm/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll
+++ b/llvm/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll
@@ -11,9 +11,7 @@
 ; no longer used function 'bar' (due to incorrect reference
 ; count in the CallGraph).
 
-attributes #0 = { noinline norecurse nounwind readnone }
-
-define void @foo() #0 {
+define void @foo() {
 ; CHECK-LABEL: @foo(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    ret void
@@ -23,7 +21,7 @@ entry:
   ret void
 }
 
-define internal i32 @bar() #0 {
+define internal i32 @bar() {
 ; CHECK-NOT: bar
 entry:
   ret i32 42

diff  --git a/llvm/test/Transforms/InstCombine/fputs-opt-size.ll b/llvm/test/Transforms/InstCombine/fputs-opt-size.ll
index 54ac96f9f862..f39d0465c636 100644
--- a/llvm/test/Transforms/InstCombine/fputs-opt-size.ll
+++ b/llvm/test/Transforms/InstCombine/fputs-opt-size.ll
@@ -2,7 +2,8 @@
 ; because it requires more arguments and thus extra MOVs are required.
 ;
 ; RUN: opt < %s -instcombine -S | FileCheck %s
-; RUN: opt < %s -instcombine -pgso -S | FileCheck %s -check-prefix=PGSO
+; RUN: opt < %s -instcombine -pgso -S -enable-new-pm=0 | FileCheck %s -check-prefix=PGSO
+; RUN: opt < %s -passes='require<profile-summary>,function(instcombine)' -pgso -S | FileCheck %s -check-prefix=PGSO
 ; RUN: opt < %s -instcombine -pgso=false -S | FileCheck %s -check-prefix=NPGSO
 
 %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] }

diff  --git a/llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll b/llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
index 43887caeecbb..75888c880b22 100644
--- a/llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
+++ b/llvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -instcombine -S -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -passes='require<loops>,instcombine' -S | FileCheck %s
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 

diff  --git a/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll b/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
index 4a80a885be39..006936f2c24e 100644
--- a/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
+++ b/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -disable-output -branch-prob -instcombine -block-freq -verify-dom-info
-; RUN: opt < %s -postdomtree -analyze | FileCheck --check-prefixes=CHECK-POSTDOM %s
+; RUN: opt < %s -postdomtree -analyze -enable-new-pm=0 | FileCheck --check-prefixes=CHECK-POSTDOM %s
 ; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck --check-prefixes=CHECK-POSTDOM %s
 
 ; Demonstrate that Predicate Canonicalization (InstCombine) does not invalidate PostDomTree


        


More information about the llvm-commits mailing list