~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Integer/constpointer_bt.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
 
2
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
 
3
; RUN: diff %t1.ll %t2.ll
 
4
 
 
5
; This testcase is primarily used for testing that global values can be used as 
 
6
; constant pointer initializers.  This is tricky because they can be forward
 
7
; declared and involves an icky bytecode encoding.  There is no meaningful 
 
8
; optimization that can be performed on this file, it is just here to test 
 
9
; assembly and disassembly.
 
10
;
 
11
 
 
12
 
 
13
@t3 = global i40 * @t1           ;; Forward reference
 
14
@t1 = global i40 4
 
15
@t4 = global i40 ** @t3          ;; reference to reference
 
16
 
 
17
@t2 = global i40 * @t1
 
18
 
 
19
global float * @2                ;; Forward numeric reference
 
20
global float * @2                ;; Duplicate forward numeric reference
 
21
global float 0.0
 
22
global float * @2                ;; Numeric reference
 
23
 
 
24
 
 
25
@fptr = global void() * @f       ;; Forward ref method defn
 
26
declare void @"f"()               ;; External method
 
27
 
 
28
@sptr1   = global [11x i8]* @somestr            ;; Forward ref to a constant
 
29
@somestr = constant [11x i8] c"hello world"
 
30
@sptr2   = global [11x i8]* @somestr
 
31
 
 
32