[llvm] ee7e03e - [Reassociate][test] Delete improper -NOT patterns to work with -enable-new-pm=1

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 23:59:18 PDT 2020


Author: Fangrui Song
Date: 2020-10-28T23:59:11-07:00
New Revision: ee7e03e19e7447985d4710dd93d94bdecc665989

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

LOG: [Reassociate][test] Delete improper -NOT patterns to work with -enable-new-pm=1

The two tests rely on LegacyInlinerBase::doFinalization to remove
Function::isDefTriviallyDead() functions. The new PM does not have the behavior.
The -NEXT patterns checking the emptiness are actually sufficient.

Note, reassociate-deadinst.ll has become stale - it no longer catches
the problem r285380 intended. Unfortunately it is difficult to craft a
new test because it is actually pretty difficult to break it with
`MadeChange = true;` all over the file.

Added: 
    

Modified: 
    llvm/test/Transforms/Reassociate/erase_inst_made_change.ll
    llvm/test/Transforms/Reassociate/reassociate-deadinst.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll b/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll
index febb9447e2b4..0bb926f207ae 100644
--- a/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll
+++ b/llvm/test/Transforms/Reassociate/erase_inst_made_change.ll
@@ -21,7 +21,6 @@ entry:
 }
 
 define internal void @bar() noinline nounwind readnone {
-; CHECK-NOT: bar
 entry:
   ret void
 }

diff  --git a/llvm/test/Transforms/Reassociate/reassociate-deadinst.ll b/llvm/test/Transforms/Reassociate/reassociate-deadinst.ll
index 9266fce48e8f..5384a658fadc 100644
--- a/llvm/test/Transforms/Reassociate/reassociate-deadinst.ll
+++ b/llvm/test/Transforms/Reassociate/reassociate-deadinst.ll
@@ -1,6 +1,5 @@
 ; RUN: opt < %s -inline -function-attrs -reassociate -S | FileCheck %s
 
-; CHECK-NOT: func1
 ; CHECK-LABEL: main
 ; CHECK-NEXT: ret void
 


        


More information about the llvm-commits mailing list