summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/GlobalsModRef/inaccessiblememonly.ll
blob: d7a3cfc78a3334694436a8cd1050717acabc737a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; 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 }
OpenPOWER on IntegriCloud