1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Analysis/MemorySSA/pr43317.ll
Arthur Eubanks d30f886c6b [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
2020-08-05 15:59:45 -07:00

37 lines
1.3 KiB
LLVM

; 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
; CHECK-LABEL: @main()
; CHECK-NOT: 5 = MemoryPhi(
; CHECK-NOT: 6 = MemoryPhi(
; CHECK: 4 = MemoryPhi(
; CHECK-NOT: 7 = MemoryPhi(
define dso_local void @main() {
entry:
store i32 undef, i32* @v_335, align 1
br i1 undef, label %gate, label %exit
nopredentry1: ; No predecessors!
br label %preinfiniteloop
nopredentry2: ; No predecessors!
br label %gate
gate: ; preds = %nopredentry2, %entry
br i1 undef, label %preinfiniteloop, label %exit
preinfiniteloop: ; preds = %gate, %nopredentry1
br label %infiniteloop
infiniteloop: ; preds = %infiniteloop, %preinfiniteloop
store i16 undef, i16* @v_295, align 1
br label %infiniteloop
exit: ; preds = %gate, %entry
store i64 undef, i64* @v_274, align 1
ret void
}