llvm.org GIT mirror llvm / 83a278e
Convert testcase to use correct syntax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3356 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 18 years ago
1 changed file(s) with 15 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
55 ;; Test constant cast expressions
66 ;;-------------------------------
77
8 %t2 = global int* %t1 ;; Forward reference without cast
9 %t3 = global uint* cast int* %t1 ;; Forward reference with cast
10 %t1 = global int 4 ;; int* %0
11 %t4 = global int** cast uint** %t3 ;; Cast of a previous cast
12 %t5 = global uint** %t3 ;; Reference to a previous cast
13 %t6 = global int*** %t4 ;; Different ref. to a previous cast
14 %t7 = global float* cast int 12345678 ;; Cast ordinary value to ptr
15 %t9 = global int cast float cast int 8 ;; Nested cast expression
8 %t2 = global int* %t1 ;; Forward reference without cast
9 %t3 = global uint* cast int* %t1 to uint* ;; Forward reference with cast
10 %t1 = global int 4 ;; int* %0
11 %t4 = global int** cast uint** %t3 to int** ;; Cast of a previous cast
12 %t5 = global uint** %t3 ;; Reference to a previous cast
13 %t6 = global int*** %t4 ;; Different ref. to a previous cast
14 %t7 = global float* cast int 12345678 to float* ;; Cast ordinary value to ptr
15 %t9 = global int cast float cast int 8 to float to int ;; Nested cast expression
1616
17 global int* cast float* %0 ;; Forward numeric reference
17 global int* cast float* %0 to int* ;; Forward numeric reference
1818 global float* %0 ;; Duplicate forward numeric reference
1919 global float 0.0
2020
3030 %somestr = constant [11x sbyte] c"hello world"
3131 %char5 = global sbyte* getelementptr([11x sbyte]* %somestr, uint 0, uint 5)
3232
33 %char8a = global int* cast sbyte* getelementptr([11x sbyte]* %somestr, uint 0, uint 8) ;; cast of getelementptr
33 ;; cast of getelementptr
34 %char8a = global int* cast sbyte* getelementptr([11x sbyte]* %somestr, uint 0, uint 8) to int*
3435
35 %char8b = global sbyte* getelementptr([11x sbyte]* %somestr, uint cast ubyte 0, uint cast sbyte 8) ;; getelementptr containing casts
36 ;; getelementptr containing casts
37 %char8b = global sbyte* getelementptr([11x sbyte]* %somestr, uint cast ubyte 0 to uint, uint cast sbyte 8 to uint)
3638
3739 ;;-------------------------------------------------------
3840 ;; TODO: Test constant getelementpr expressions for structures
7274 ;; Test duplicate constant expressions
7375 ;;---------------------------------------------------
7476
75 %t4 = global int** cast uint** %t3
77 %t4 = global int** cast uint** %t3 to int**
7678
77 %char8a = global int* cast sbyte* getelementptr([11x sbyte]* %somestr, uint 0, uint 8)
79 %char8a = global int* cast sbyte* getelementptr([11x sbyte]* %somestr, uint 0, uint 8) to int*
7880
7981 %S3fld3 = global float* getelementptr (%SAType** %S3, uint 0, uint 0, ubyte 1, ubyte 0, uint 0)
8082