[llvm] [MemorySSA] Update test to use NewPM (PR #72915)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 13:10:07 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

This test is the last holdout that still uses the legacy loop simplify CFG pass. The issues originally pointed out in the test comments seem to have been fixed now as there are no MemorySSA verification failures.

---
Full diff: https://github.com/llvm/llvm-project/pull/72915.diff


1 Files Affected:

- (modified) llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll (+3-6) 


``````````diff
diff --git a/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll b/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll
index 45ab48e1cca8570..26f1ad7c8bce262 100644
--- a/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll
+++ b/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll
@@ -1,8 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -simple-loop-unswitch -loop-reduce -loop-simplifycfg -verify-memoryssa -S %s | FileCheck %s
-
-; TODO: also run with NPM, but currently LSR does not preserve LCSSA, causing a verification failure on the test.
-;   opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>,loop-reduce,simplifycfg)' -verify-memoryssa -S %s | FileCheck %s
+; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>,loop-reduce,loop-simplifycfg)' -verify-memoryssa -S %s | FileCheck %s
 
 ; Test case for PR47557.
 
@@ -18,8 +15,8 @@ define ptr @test() {
 ; CHECK-LABEL: @test(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    switch i32 0, label [[ENTRY_SPLIT:%.*]] [
-; CHECK-NEXT:    i32 1, label [[FOR_BODY3SPLIT:%.*]]
-; CHECK-NEXT:    i32 2, label [[FOR_COND2_2_FOR_BODY3_CRIT_EDGE:%.*]]
+; CHECK-NEXT:      i32 1, label [[FOR_BODY3SPLIT:%.*]]
+; CHECK-NEXT:      i32 2, label [[FOR_COND2_2_FOR_BODY3_CRIT_EDGE:%.*]]
 ; CHECK-NEXT:    ]
 ; CHECK:       entry.split:
 ; CHECK-NEXT:    br label [[FOR_COND:%.*]]

``````````

</details>


https://github.com/llvm/llvm-project/pull/72915


More information about the llvm-commits mailing list