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

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 13:09:37 PST 2023


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

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.

>From c8c81555e57741e1371f5af4c4991b7b5e088737 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Mon, 20 Nov 2023 13:04:41 -0800
Subject: [PATCH] [MemorySSA] Update test to use NewPM

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.
---
 .../test/Analysis/MemorySSA/update-remove-dead-blocks.ll | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

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:%.*]]



More information about the llvm-commits mailing list