mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
d30f886c6b
-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
26 lines
978 B
LLVM
26 lines
978 B
LLVM
; 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(
|
|
; CHECK: 1 = MemoryDef(liveOnEntry)
|
|
; CHECK: MemoryUse(1) MustAlias
|
|
define <vscale x 4 x i32> @f(<vscale x 4 x i32> %z) {
|
|
%a = alloca <vscale x 4 x i32>
|
|
store <vscale x 4 x i32> %z, <vscale x 4 x i32>* %a
|
|
%zz = load <vscale x 4 x i32>, <vscale x 4 x i32>* %a
|
|
ret <vscale x 4 x i32> %zz
|
|
}
|
|
|
|
; CHECK-LABEL: define i32 @g(
|
|
; CHECK: 1 = MemoryDef(liveOnEntry)
|
|
; CHECK: MemoryUse(1) MayAlias
|
|
declare i32* @gg(<vscale x 4 x i32>* %a)
|
|
define i32 @g(i32 %z, i32 *%bb) {
|
|
%a = alloca <vscale x 4 x i32>
|
|
%aa = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %a, i32 0, i32 0
|
|
store i32 %z, i32* %aa
|
|
%bbb = call i32* @gg(<vscale x 4 x i32>* %a) readnone
|
|
%zz = load i32, i32* %bbb
|
|
ret i32 %zz
|
|
}
|