llvm/test/Analysis/GlobalsModRef/inaccessiblememonly.ll
Amaury Sechet c9f1b312c4 Revert "GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and InaccessibleMemOrArgMemOnly attributes"
Summary:
This reverts commit 5a9e526f29.

As per discussion in D15665

This also add a test case so that regression introduced by that diff are not reintroduced.

Reviewers: vaivaswatha, jmolloy, hfinkel, reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15919

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256932 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-06 13:23:52 +00:00

22 lines
633 B
LLVM

; RUN: opt -O3 -S < %s | FileCheck %s
target datalayout = "e-i64:64-f80:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
define void @donteliminate() {
; CHECK-LABEL: donteliminate
; CHECK-NEXT: tail call noalias i8* @allocmemory()
; CHECK-NEXT: tail call noalias i8* @allocmemory()
; CHECK-NEXT: tail call noalias i8* @allocmemory()
; CHECK-NEXT: ret void
%1 = tail call noalias i8* @allocmemory()
%2 = tail call noalias i8* @allocmemory()
%3 = tail call noalias i8* @allocmemory()
ret void
}
; Function Attrs: inaccessiblememonly
declare noalias i8* @allocmemory() #0
attributes #0 = { inaccessiblememonly }