1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Analysis/GlobalsModRef/inaccessiblememonly.ll
Amaury Sechet 2856f73ed4 Revert "GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and InaccessibleMemOrArgMemOnly attributes"
Summary:
This reverts commit 5a9e526f29cf8510ab5c3d566fbdcf47ac24e1e9.

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

llvm-svn: 256932
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 }