mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[MSSA][NewPM] Handle tests with -print-memoryssa
-print-memoryssa in legacy PM is print<memoryssa> in NPM. Pin tests with -print-memoryssa to legacy PM. Add corresponding tests for NPM where missing. This fixes "unknown pass name 'print-memoryssa'". Some tests still fail in Analysis/MemorySSA due to other passes that haven't been ported. pr43427.ll and pr43438.ll required adding -aa-pipeline=basic-aa, -loop-simplify (since it doesn't run on legacy PM by default), and decrementing some of the MemoryPhi numbers. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D85333
This commit is contained in:
parent
a04fa612fc
commit
d30f886c6b
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Ensures that assumes are treated as not reading or writing memory.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Ensures that atomic loads count as MemoryDefs
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -disable-output -basic-aa -print-memoryssa %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -basic-aa -enable-new-pm=0 -print-memoryssa %s 2>&1 | FileCheck %s
|
||||
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Things that BasicAA can prove points to constant memory should be
|
||||
; liveOnEntry, as well.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
|
||||
%struct.hoge = type { i32, %struct.widget }
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -disable-basic-aa -print-memoryssa -disable-output %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-basic-aa -enable-new-pm=0 -print-memoryssa -disable-output %s 2>&1 | FileCheck %s
|
||||
|
||||
; Note that the test crashes the MemorySSA verification when doing loop-rotate,
|
||||
; if debuginfo is modelled in MemorySSA, due to the fact that MemorySSA is not
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Ensuring that external functions without attributes are MemoryDefs
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Test that various function attributes give us sane results.
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Currently, MemorySSA doesn't support invariant groups. So, we should ignore
|
||||
; launder.invariant.group intrinsics entirely. We'll need to pay attention to
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
; This test checks a number of things:
|
||||
; First, the lifetime markers should not clobber any uses of Q or P.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Invariant loads should be considered live on entry, because, once the
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -disable-basic-aa -print-memoryssa -disable-output %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-basic-aa -enable-new-pm=0 -print-memoryssa -disable-output %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -passes='print<memoryssa>' -disable-output %s 2>&1 | FileCheck %s
|
||||
|
||||
; Note: if @foo is modelled as a MemoryDef, this test will assert with -loop-rotate, due to MemorySSA not
|
||||
; being preserved when moving instructions that may not read from or write to memory.
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -loop-rotate -print-memoryssa -disable-output -enable-mssa-loop-dependency -verify-memoryssa %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -loop-rotate -enable-new-pm=0 -print-memoryssa -disable-output -enable-mssa-loop-dependency -verify-memoryssa %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -passes='loop-mssa(loop-rotate),print<memoryssa>' -disable-output -verify-memoryssa %s 2>&1 | FileCheck %s
|
||||
; REQUIRES: asserts
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; many-dom.ll, with an added back-edge back into the switch.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Testing many dominators, specifically from a switch statement in C.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Makes sure we have a sane model if both successors of some block is the same
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
|
||||
; hfinkel's case
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Checks that basicAA is doing some amount of disambiguation for us
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; This test ensures we don't end up with multiple reaching defs for a single
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
|
||||
; RUN: opt -memssa-check-limit=0 -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
|
||||
; RUN: opt -memssa-check-limit=0 -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
|
||||
; RUN: opt -memssa-check-limit=0 -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
|
||||
; RUN: opt -memssa-check-limit=0 -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
|
||||
; RUN: opt -memssa-check-limit=0 -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
|
||||
; RUN: opt -memssa-check-limit=0 -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
|
||||
; This testcase is reduced from SingleSource/Benchmarks/Misc/fbench.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -memoryssa -analyze < %s 2>&1 -S | FileCheck %s
|
||||
; RUN: opt -basic-aa -memoryssa -enable-new-pm=0 -analyze < %s 2>&1 -S | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -S < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; We weren't properly considering the args in callsites in equality or hashing.
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -disable-output -licm -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
|
||||
target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
|
||||
target triple = "s390x-ibm-linux"
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -disable-output -licm -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
|
||||
@v_274 = external dso_local global i64, align 1
|
||||
@v_295 = external dso_local global i16, align 1
|
||||
@v_335 = external dso_local global i32, align 1
|
||||
|
@ -1,9 +1,10 @@
|
||||
; RUN: opt -disable-output -licm -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -loop-simplify -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -aa-pipeline=basic-aa -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK-LABEL: @f()
|
||||
; CHECK: 8 = MemoryPhi(
|
||||
; CHECK: 7 = MemoryPhi(
|
||||
; CHECK: 9 = MemoryPhi(
|
||||
; CHECK: 6 = MemoryPhi(
|
||||
; CHECK: 8 = MemoryPhi(
|
||||
define void @f() {
|
||||
entry:
|
||||
%e = alloca i16, align 1
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -disable-output -licm -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -loop-simplify -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -disable-output -aa-pipeline=basic-aa -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
; CHECK-LABEL: @main()
|
||||
@ -46,11 +47,11 @@ if.end569: ; preds = %if.else568, %if.the
|
||||
|
||||
|
||||
; CHECK-LABEL: @f()
|
||||
; CHECK: 8 = MemoryPhi(
|
||||
; CHECK: 7 = MemoryPhi(
|
||||
; CHECK: 11 = MemoryPhi(
|
||||
; CHECK: 6 = MemoryPhi(
|
||||
; CHECK: 10 = MemoryPhi(
|
||||
; CHECK: 9 = MemoryPhi(
|
||||
; CHECK: 8 = MemoryPhi(
|
||||
define void @f() {
|
||||
entry:
|
||||
%e = alloca i16, align 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze -memssa-check-limit=0 < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze -memssa-check-limit=0 < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa -disable-output -memssa-check-limit=0 < %s 2>&1 | FileCheck %s
|
||||
target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
|
||||
target triple = "amdgcn"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa -disable-output < %s 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK-LABEL: define <vscale x 4 x i32> @f(
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -enable-mssa-loop-dependency -verify-memoryssa -loop-rotate -S %s | FileCheck %s
|
||||
; RUN: opt -enable-new-pm=0 -enable-mssa-loop-dependency -verify-memoryssa -loop-rotate -S %s | FileCheck %s
|
||||
; RUN: opt -verify-memoryssa -passes='loop-mssa(loop-rotate)' -S %s | FileCheck %s
|
||||
; REQUIRES: asserts
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -basic-aa -print-memoryssa -verify-memoryssa -enable-new-pm=0 -analyze < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s
|
||||
;
|
||||
; Ensures that volatile stores/loads count as MemoryDefs
|
||||
|
Loading…
Reference in New Issue
Block a user