mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
[Attributor][FIX] NullPointerIsDefined needs the pointer AS (AANonNull)
Also includes a shortcut via AADereferenceable if possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
; RUN: opt -S -passes=attributor -aa-pipeline='basic-aa' -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=2 < %s | FileCheck %s
|
||||
; RUN: opt -S -passes=attributor -aa-pipeline='basic-aa' -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=3 < %s | FileCheck %s
|
||||
|
||||
; TEST 1 - negative.
|
||||
|
||||
|
||||
@@ -523,6 +523,13 @@ define i32 addrspace(3)* @gep2(i32 addrspace(3)* %p) {
|
||||
ret i32 addrspace(3)* %q
|
||||
}
|
||||
|
||||
; FNATTR: define i32 addrspace(3)* @as(i32 addrspace(3)* readnone returned dereferenceable(4) %p)
|
||||
; FIXME: We should propagate dereferenceable here but *not* nonnull
|
||||
; ATTRIBUTOR: define dereferenceable_or_null(4) i32 addrspace(3)* @as(i32 addrspace(3)* readnone returned dereferenceable(4) dereferenceable_or_null(4) %p)
|
||||
define i32 addrspace(3)* @as(i32 addrspace(3)* dereferenceable(4) %p) {
|
||||
ret i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; BOTH: define internal nonnull i32* @g2()
|
||||
define internal i32* @g2() {
|
||||
ret i32* inttoptr (i64 4 to i32*)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
; RUN: opt < %s -functionattrs -S | FileCheck %s
|
||||
; RUN: opt < %s -attributor -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=2 -S | FileCheck %s --check-prefix=ATTRIBUTOR
|
||||
; RUN: opt < %s -attributor -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=3 -S | FileCheck %s --check-prefix=ATTRIBUTOR
|
||||
|
||||
; TEST 1
|
||||
; CHECK: Function Attrs: norecurse nounwind readnone
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt -functionattrs -enable-nonnull-arg-prop -attributor -attributor-manifest-internal -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=6 -S < %s | FileCheck %s
|
||||
; RUN: opt -functionattrs -enable-nonnull-arg-prop -attributor -attributor-manifest-internal -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=7 -S < %s | FileCheck %s
|
||||
;
|
||||
; This is an evolved example to stress test SCC parameter attribute propagation.
|
||||
; The SCC in this test is made up of the following six function, three of which
|
||||
|
||||
Reference in New Issue
Block a user