mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
ad27d24acf
This allows testing AMDGPU alias analysis like any other alias analysis pass. This fixes the existing test pointlessly running opt -O3 when it really just wants to run the one analysis. Before there was no way to test this using -aa-eval with opt, since the default constructed pass is run. The wrapper subclass allows the default constructor to pass the necessary callback. llvm-svn: 346353
53 lines
1.6 KiB
LLVM
53 lines
1.6 KiB
LLVM
; RUN: opt -mtriple=amdgcn-- -aa-eval -amdgpu-aa -amdgpu-aa-wrapper -disable-basicaa -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s
|
|
; RUN: opt -mtriple=r600-- -aa-eval -amdgpu-aa -amdgpu-aa-wrapper -disable-basicaa -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s
|
|
|
|
; CHECK: NoAlias: i8 addrspace(1)* %p1, i8 addrspace(5)* %p
|
|
|
|
define void @test(i8 addrspace(5)* %p, i8 addrspace(1)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(1)* %p1, i8 addrspace(4)* %p
|
|
|
|
define void @test_constant_vs_global(i8 addrspace(4)* %p, i8 addrspace(1)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(1)* %p, i8 addrspace(4)* %p1
|
|
|
|
define void @test_global_vs_constant(i8 addrspace(1)* %p, i8 addrspace(4)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(1)* %p1, i8 addrspace(6)* %p
|
|
|
|
define void @test_constant_32bit_vs_global(i8 addrspace(6)* %p, i8 addrspace(1)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(4)* %p1, i8 addrspace(6)* %p
|
|
|
|
define void @test_constant_32bit_vs_constant(i8 addrspace(6)* %p, i8 addrspace(4)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(999)* %p0, i8* %p
|
|
define void @test_0_999(i8 addrspace(0)* %p, i8 addrspace(999)* %p0) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(999)* %p, i8* %p1
|
|
define void @test_999_0(i8 addrspace(999)* %p, i8 addrspace(0)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(1)* %p, i8 addrspace(999)* %p1
|
|
define void @test_1_999(i8 addrspace(1)* %p, i8 addrspace(999)* %p1) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: MayAlias: i8 addrspace(1)* %p1, i8 addrspace(999)* %p
|
|
define void @test_999_1(i8 addrspace(999)* %p, i8 addrspace(1)* %p1) {
|
|
ret void
|
|
}
|