mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Make "@name =" mandatory for globals in .ll files.
An oddity of the .ll syntax is that the "@var = " in @var = global i32 42 is optional. Writing just global i32 42 is equivalent to @0 = global i32 42 This means that there is a pretty big First set at the top level. The current implementation maintains it manually. I was trying to refactor it, but then started wondering why keep it a all. I personally find the above syntax confusing. It looks like something is missing. This patch removes the feature and simplifies the parser. llvm-svn: 269096
This commit is contained in:
parent
1e468d612b
commit
3560edede3
@ -621,7 +621,7 @@ Variables and aliases can have a
|
||||
|
||||
Syntax::
|
||||
|
||||
[@<GlobalVarName> =] [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal]
|
||||
@<GlobalVarName> = [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal]
|
||||
[unnamed_addr] [AddrSpace] [ExternallyInitialized]
|
||||
<global | constant> <Type> [<InitializerConstant>]
|
||||
[, section "name"] [, comdat [($name)]]
|
||||
|
@ -252,46 +252,6 @@ bool LLParser::ParseTopLevelEntities() {
|
||||
case lltok::ComdatVar: if (parseComdat()) return true; break;
|
||||
case lltok::exclaim: if (ParseStandaloneMetadata()) return true; break;
|
||||
case lltok::MetadataVar:if (ParseNamedMetadata()) return true; break;
|
||||
|
||||
// The Global variable production with no name can have many different
|
||||
// optional leading prefixes, the production is:
|
||||
// GlobalVar ::= OptionalLinkage OptionalVisibility OptionalDLLStorageClass
|
||||
// OptionalThreadLocal OptionalAddrSpace OptionalUnnamedAddr
|
||||
// ('constant'|'global') ...
|
||||
case lltok::kw_private: // OptionalLinkage
|
||||
case lltok::kw_internal: // OptionalLinkage
|
||||
case lltok::kw_weak: // OptionalLinkage
|
||||
case lltok::kw_weak_odr: // OptionalLinkage
|
||||
case lltok::kw_linkonce: // OptionalLinkage
|
||||
case lltok::kw_linkonce_odr: // OptionalLinkage
|
||||
case lltok::kw_appending: // OptionalLinkage
|
||||
case lltok::kw_common: // OptionalLinkage
|
||||
case lltok::kw_extern_weak: // OptionalLinkage
|
||||
case lltok::kw_external: // OptionalLinkage
|
||||
case lltok::kw_default: // OptionalVisibility
|
||||
case lltok::kw_hidden: // OptionalVisibility
|
||||
case lltok::kw_protected: // OptionalVisibility
|
||||
case lltok::kw_dllimport: // OptionalDLLStorageClass
|
||||
case lltok::kw_dllexport: // OptionalDLLStorageClass
|
||||
case lltok::kw_thread_local: // OptionalThreadLocal
|
||||
case lltok::kw_addrspace: // OptionalAddrSpace
|
||||
case lltok::kw_constant: // GlobalType
|
||||
case lltok::kw_global: { // GlobalType
|
||||
unsigned Linkage, Visibility, DLLStorageClass;
|
||||
bool UnnamedAddr;
|
||||
GlobalVariable::ThreadLocalMode TLM;
|
||||
bool HasLinkage;
|
||||
if (ParseOptionalLinkage(Linkage, HasLinkage) ||
|
||||
ParseOptionalVisibility(Visibility) ||
|
||||
ParseOptionalDLLStorageClass(DLLStorageClass) ||
|
||||
ParseOptionalThreadLocal(TLM) ||
|
||||
parseOptionalUnnamedAddr(UnnamedAddr) ||
|
||||
ParseGlobal("", SMLoc(), Linkage, HasLinkage, Visibility,
|
||||
DLLStorageClass, TLM, UnnamedAddr))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
case lltok::kw_attributes: if (ParseUnnamedAttrGrp()) return true; break;
|
||||
case lltok::kw_uselistorder: if (ParseUseListOrder()) return true; break;
|
||||
case lltok::kw_uselistorder_bb:
|
||||
|
@ -2,4 +2,4 @@
|
||||
; RUN: grep "struct initializer doesn't match struct element type" %t
|
||||
; Test the case of a misformed constant initializer
|
||||
; This should cause an assembler error, not an assertion failure!
|
||||
constant { i32 } { float 1.0 }
|
||||
@0 = constant { i32 } { float 1.0 }
|
||||
|
@ -2,4 +2,4 @@
|
||||
; RUN: verify-uselistorder %s
|
||||
; Test that shift instructions can be used in constant expressions.
|
||||
|
||||
global i32 3670016
|
||||
@0 = global i32 3670016
|
||||
|
@ -2,4 +2,4 @@
|
||||
; RUN: not llvm-as < %s > /dev/null 2> %t
|
||||
; RUN: grep "constexpr requires integer operands" %t
|
||||
|
||||
global i32 ashr (float 1.0, float 2.0)
|
||||
@0 = global i32 ashr (float 1.0, float 2.0)
|
||||
|
@ -2,4 +2,4 @@
|
||||
; RUN: not llvm-as < %s > /dev/null 2> %t
|
||||
; RUN: grep "initializer with struct type has wrong # elements" %t
|
||||
|
||||
global {} { i32 7, float 1.0, i32 7, i32 8 }
|
||||
@0 = global {} { i32 7, float 1.0, i32 7, i32 8 }
|
||||
|
@ -2,4 +2,4 @@
|
||||
; RUN: verify-uselistorder %s
|
||||
|
||||
@A = external global { float } ; <{ float }*> [#uses=2]
|
||||
global i32* bitcast ({ float }* @A to i32*) ; <i32**>:0 [#uses=0]
|
||||
@0 = global i32* bitcast ({ float }* @A to i32*) ; <i32**>:0 [#uses=0]
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | grep 9223372036854775808
|
||||
; RUN: verify-uselistorder %s
|
||||
|
||||
global i64 -9223372036854775808
|
||||
@0 = global i64 -9223372036854775808
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
; RUN: verify-uselistorder %s
|
||||
|
||||
; CHECK: global double -0.000000e+00
|
||||
global double 0x8000000000000000
|
||||
@0 = global double 0x8000000000000000
|
||||
|
||||
; CHECK: global float -0.000000e+00
|
||||
global float -0.0
|
||||
@1 = global float -0.0
|
||||
|
||||
|
@ -3,5 +3,5 @@
|
||||
; PR3372
|
||||
|
||||
@X = global i32* @0
|
||||
global i32 4
|
||||
@0 = global i32 4
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
|
||||
@A = global i64 0
|
||||
|
||||
global i64* inttoptr (i64 add (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X + 0 == X
|
||||
global i64* inttoptr (i64 sub (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X - 0 == X
|
||||
global i64* inttoptr (i64 mul (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X * 0 == 0
|
||||
global i64* inttoptr (i64 sdiv (i64 ptrtoint (i64* @A to i64), i64 1) to i64*) ; X / 1 == X
|
||||
global i64* inttoptr (i64 srem (i64 ptrtoint (i64* @A to i64), i64 1) to i64*) ; X % 1 == 0
|
||||
global i64* inttoptr (i64 and (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X & 0 == 0
|
||||
global i64* inttoptr (i64 and (i64 ptrtoint (i64* @A to i64), i64 -1) to i64*) ; X & -1 == X
|
||||
global i64 or (i64 ptrtoint (i64* @A to i64), i64 -1) ; X | -1 == -1
|
||||
global i64* inttoptr (i64 xor (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X ^ 0 == X
|
||||
@0 = global i64* inttoptr (i64 add (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X + 0 == X
|
||||
@1 = global i64* inttoptr (i64 sub (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X - 0 == X
|
||||
@2 = global i64* inttoptr (i64 mul (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X * 0 == 0
|
||||
@3 = global i64* inttoptr (i64 sdiv (i64 ptrtoint (i64* @A to i64), i64 1) to i64*) ; X / 1 == X
|
||||
@4 = global i64* inttoptr (i64 srem (i64 ptrtoint (i64* @A to i64), i64 1) to i64*) ; X % 1 == 0
|
||||
@5 = global i64* inttoptr (i64 and (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X & 0 == 0
|
||||
@6 = global i64* inttoptr (i64 and (i64 ptrtoint (i64* @A to i64), i64 -1) to i64*) ; X & -1 == X
|
||||
@7 = global i64 or (i64 ptrtoint (i64* @A to i64), i64 -1) ; X | -1 == -1
|
||||
@8 = global i64* inttoptr (i64 xor (i64 ptrtoint (i64* @A to i64), i64 0) to i64*) ; X ^ 0 == X
|
||||
|
||||
%Ty = type { i32, i32 }
|
||||
@B = external global %Ty
|
||||
|
||||
global i1 icmp slt (i64* @A, i64* getelementptr (i64, i64* @A, i64 1)) ; true
|
||||
global i1 icmp ult (i64* @A, i64* getelementptr (i64, i64* @A, i64 1)) ; true
|
||||
global i1 icmp slt (i64* @A, i64* getelementptr (i64, i64* @A, i64 0)) ; false
|
||||
global i1 icmp slt (i32* getelementptr (%Ty, %Ty* @B, i64 0, i32 0),
|
||||
@9 = global i1 icmp slt (i64* @A, i64* getelementptr (i64, i64* @A, i64 1)) ; true
|
||||
@10 = global i1 icmp ult (i64* @A, i64* getelementptr (i64, i64* @A, i64 1)) ; true
|
||||
@11 = global i1 icmp slt (i64* @A, i64* getelementptr (i64, i64* @A, i64 0)) ; false
|
||||
@12 = global i1 icmp slt (i32* getelementptr (%Ty, %Ty* @B, i64 0, i32 0),
|
||||
i32* getelementptr (%Ty, %Ty* @B, i64 0, i32 1)) ; true
|
||||
;global i1 icmp ne (i64* @A, i64* bitcast (%Ty* @B to i64*)) ; true
|
||||
|
||||
; PR2206
|
||||
@cons = weak global i32 0, align 8 ; <i32*> [#uses=1]
|
||||
global i64 and (i64 ptrtoint (i32* @cons to i64), i64 7)
|
||||
@13 = global i64 and (i64 ptrtoint (i32* @cons to i64), i64 7)
|
||||
|
||||
global <2 x i8*> getelementptr(i8, <2 x i8*> undef, <2 x i64> <i64 1, i64 1>)
|
||||
global <2 x i8*> getelementptr({ i8 }, <2 x { i8 }*> undef, <2 x i64> <i64 1, i64 1>, <2 x i32> <i32 0, i32 0>)
|
||||
global <2 x i8*> getelementptr(i8, <2 x i8*> zeroinitializer, <2 x i64> <i64 0, i64 0>)
|
||||
global <2 x i8*> getelementptr({ i8 }, <2 x { i8 }*> zeroinitializer, <2 x i64> <i64 0, i64 0>, <2 x i32> <i32 0, i32 0>)
|
||||
@14 = global <2 x i8*> getelementptr(i8, <2 x i8*> undef, <2 x i64> <i64 1, i64 1>)
|
||||
@15 = global <2 x i8*> getelementptr({ i8 }, <2 x { i8 }*> undef, <2 x i64> <i64 1, i64 1>, <2 x i32> <i32 0, i32 0>)
|
||||
@16 = global <2 x i8*> getelementptr(i8, <2 x i8*> zeroinitializer, <2 x i64> <i64 0, i64 0>)
|
||||
@17 = global <2 x i8*> getelementptr({ i8 }, <2 x { i8 }*> zeroinitializer, <2 x i64> <i64 0, i64 0>, <2 x i32> <i32 0, i32 0>)
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
; CHECK: getelementptr vector index has a wrong number of elements
|
||||
|
||||
global <2 x i32*> getelementptr ([3 x {i32, i32}], <4 x [3 x {i32, i32}]*> zeroinitializer, <2 x i32> <i32 1, i32 2>, <2 x i32> <i32 2, i32 3>, <2 x i32> <i32 1, i32 1>)
|
||||
@0 = global <2 x i32*> getelementptr ([3 x {i32, i32}], <4 x [3 x {i32, i32}]*> zeroinitializer, <2 x i32> <i32 1, i32 2>, <2 x i32> <i32 2, i32 3>, <2 x i32> <i32 1, i32 1>)
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
|
||||
global i64 u0x0p001
|
||||
@0 = global i64 u0x0p001
|
||||
; CHECK: expected value token
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: invalid cast opcode for cast from 'i64' to 'i64'
|
||||
global i64* inttoptr (i64 0 to i64)
|
||||
@0 = global i64* inttoptr (i64 0 to i64)
|
||||
|
@ -12,6 +12,6 @@ entry:
|
||||
ret <4 x i1> %cmp
|
||||
}
|
||||
|
||||
global <4 x i1> icmp slt ( <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 1, i32 2, i32 1, i32 2> )
|
||||
@0 = global <4 x i1> icmp slt ( <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 1, i32 2, i32 1, i32 2> )
|
||||
@B = external global i32
|
||||
global <4 x i1> icmp slt ( <4 x i32> <i32 ptrtoint (i32 * @B to i32), i32 1, i32 1, i32 1>, <4 x i32> <i32 1, i32 2, i32 1, i32 2> )
|
||||
@1 = global <4 x i1> icmp slt ( <4 x i32> <i32 ptrtoint (i32 * @B to i32), i32 1, i32 1, i32 1>, <4 x i32> <i32 1, i32 2, i32 1, i32 2> )
|
||||
|
@ -12,7 +12,7 @@
|
||||
%struct.objc_selector = type opaque
|
||||
%struct.pthread_mutex_t = type { i32, [40 x i8] }
|
||||
%struct.pthread_rwlock_t = type { i32, [124 x i8] }
|
||||
external constant %struct.__builtin_CFString ; <%struct.__builtin_CFString*>:0 [#uses=1]
|
||||
@0 = external constant %struct.__builtin_CFString ; <%struct.__builtin_CFString*>:0 [#uses=1]
|
||||
|
||||
define void @"-[PFTPersistentSymbols saveSymbolWithName:address:path:lineNumber:flags:owner:]"(%struct.PFTPersistentSymbols* %self, %struct.objc_selector* %_cmd, %struct.NSArray* %name, i64 %address, %struct.NSArray* %path, i32 %lineNumber, i64 %flags, %struct..0objc_object* %owner) nounwind {
|
||||
entry:
|
||||
|
@ -4,38 +4,38 @@
|
||||
; Verify that movups is still generated with an aligned stack for the globals
|
||||
; that must be accessed unaligned
|
||||
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:0 [#uses=2]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:1 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:2 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:3 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:4 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:5 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:6 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:7 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:8 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:9 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:10 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:11 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:12 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:13 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:14 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:15 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:16 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:17 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:18 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:19 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:20 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:21 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:22 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:23 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:24 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:25 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:26 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:27 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:28 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:29 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:30 [#uses=1]
|
||||
external global <4 x float>, align 1 ; <<4 x float>*>:31 [#uses=1]
|
||||
@0 = external global <4 x float>, align 1 ; <<4 x float>*>:0 [#uses=2]
|
||||
@1 = external global <4 x float>, align 1 ; <<4 x float>*>:1 [#uses=1]
|
||||
@2 = external global <4 x float>, align 1 ; <<4 x float>*>:2 [#uses=1]
|
||||
@3 = external global <4 x float>, align 1 ; <<4 x float>*>:3 [#uses=1]
|
||||
@4 = external global <4 x float>, align 1 ; <<4 x float>*>:4 [#uses=1]
|
||||
@5 = external global <4 x float>, align 1 ; <<4 x float>*>:5 [#uses=1]
|
||||
@6 = external global <4 x float>, align 1 ; <<4 x float>*>:6 [#uses=1]
|
||||
@7 = external global <4 x float>, align 1 ; <<4 x float>*>:7 [#uses=1]
|
||||
@8 = external global <4 x float>, align 1 ; <<4 x float>*>:8 [#uses=1]
|
||||
@9 = external global <4 x float>, align 1 ; <<4 x float>*>:9 [#uses=1]
|
||||
@10 = external global <4 x float>, align 1 ; <<4 x float>*>:10 [#uses=1]
|
||||
@11 = external global <4 x float>, align 1 ; <<4 x float>*>:11 [#uses=1]
|
||||
@12 = external global <4 x float>, align 1 ; <<4 x float>*>:12 [#uses=1]
|
||||
@13 = external global <4 x float>, align 1 ; <<4 x float>*>:13 [#uses=1]
|
||||
@14 = external global <4 x float>, align 1 ; <<4 x float>*>:14 [#uses=1]
|
||||
@15 = external global <4 x float>, align 1 ; <<4 x float>*>:15 [#uses=1]
|
||||
@16 = external global <4 x float>, align 1 ; <<4 x float>*>:16 [#uses=1]
|
||||
@17 = external global <4 x float>, align 1 ; <<4 x float>*>:17 [#uses=1]
|
||||
@18 = external global <4 x float>, align 1 ; <<4 x float>*>:18 [#uses=1]
|
||||
@19 = external global <4 x float>, align 1 ; <<4 x float>*>:19 [#uses=1]
|
||||
@20 = external global <4 x float>, align 1 ; <<4 x float>*>:20 [#uses=1]
|
||||
@21 = external global <4 x float>, align 1 ; <<4 x float>*>:21 [#uses=1]
|
||||
@22 = external global <4 x float>, align 1 ; <<4 x float>*>:22 [#uses=1]
|
||||
@23 = external global <4 x float>, align 1 ; <<4 x float>*>:23 [#uses=1]
|
||||
@24 = external global <4 x float>, align 1 ; <<4 x float>*>:24 [#uses=1]
|
||||
@25 = external global <4 x float>, align 1 ; <<4 x float>*>:25 [#uses=1]
|
||||
@26 = external global <4 x float>, align 1 ; <<4 x float>*>:26 [#uses=1]
|
||||
@27 = external global <4 x float>, align 1 ; <<4 x float>*>:27 [#uses=1]
|
||||
@28 = external global <4 x float>, align 1 ; <<4 x float>*>:28 [#uses=1]
|
||||
@29 = external global <4 x float>, align 1 ; <<4 x float>*>:29 [#uses=1]
|
||||
@30 = external global <4 x float>, align 1 ; <<4 x float>*>:30 [#uses=1]
|
||||
@31 = external global <4 x float>, align 1 ; <<4 x float>*>:31 [#uses=1]
|
||||
|
||||
declare void @abort()
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
; RUN: llc < %s -march=x86 -mattr=+sse2
|
||||
; PR2566
|
||||
|
||||
external global i16 ; <i16*>:0 [#uses=1]
|
||||
external global <4 x i16> ; <<4 x i16>*>:1 [#uses=1]
|
||||
@0 = external global i16 ; <i16*>:0 [#uses=1]
|
||||
@1 = external global <4 x i16> ; <<4 x i16>*>:1 [#uses=1]
|
||||
|
||||
declare void @abort()
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
%struct.XCStringList = type { i32, %struct._XCStringListNode* }
|
||||
%struct._XCStringListNode = type { [3 x i8], [0 x i8], i8 }
|
||||
%struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
|
||||
internal constant %struct.__builtin_CFString { i32* getelementptr ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([3 x i8], [3 x i8]* @"\01LC", i32 0, i32 0), i32 2 } ; <%struct.__builtin_CFString*>:0 [#uses=1]
|
||||
@0 = internal constant %struct.__builtin_CFString { i32* getelementptr ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([3 x i8], [3 x i8]* @"\01LC", i32 0, i32 0), i32 2 } ; <%struct.__builtin_CFString*>:0 [#uses=1]
|
||||
@__CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
|
||||
@"\01LC" = internal constant [3 x i8] c"NO\00" ; <[3 x i8]*> [#uses=1]
|
||||
@"\01LC1" = internal constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
external global i32 ; <i32*>:0 [#uses=1]
|
||||
@0 = external global i32 ; <i32*>:0 [#uses=1]
|
||||
|
||||
declare i64 @strlen(i8* nocapture) nounwind readonly
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
; RUN: grep "extractps \$1, %xmm0, " %t | count 1
|
||||
; PR2647
|
||||
|
||||
external global float, align 16 ; <float*>:0 [#uses=2]
|
||||
@0 = external global float, align 16 ; <float*>:0 [#uses=2]
|
||||
|
||||
define internal void @""() nounwind {
|
||||
load float, float* @0, align 16 ; <float>:1 [#uses=1]
|
||||
|
@ -2,8 +2,8 @@
|
||||
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64
|
||||
|
||||
external constant <4 x i32> ; <<4 x i32>*>:0 [#uses=1]
|
||||
external constant <4 x i16> ; <<4 x i16>*>:1 [#uses=1]
|
||||
@0 = external constant <4 x i32> ; <<4 x i32>*>:0 [#uses=1]
|
||||
@1 = external constant <4 x i16> ; <<4 x i16>*>:1 [#uses=1]
|
||||
|
||||
define internal void @PR2585() {
|
||||
; X32-LABEL: PR2585:
|
||||
|
@ -10,8 +10,8 @@
|
||||
;; Test constant cast expressions
|
||||
;;-------------------------------
|
||||
|
||||
global i64 u0x00001 ; hexadecimal unsigned integer constants
|
||||
global i64 s0x0012312 ; hexadecimal signed integer constants
|
||||
@0 = global i64 u0x00001 ; hexadecimal unsigned integer constants
|
||||
@1 = global i64 s0x0012312 ; hexadecimal signed integer constants
|
||||
|
||||
@t2 = global i32* @t1 ;; Forward reference without cast
|
||||
@t3 = global i32* bitcast (i32* @t1 to i32*) ;; Forward reference with cast
|
||||
@ -22,9 +22,9 @@ global i64 s0x0012312 ; hexadecimal signed integer constants
|
||||
@t7 = global float* inttoptr (i32 12345678 to float*) ;; Cast ordinary value to ptr
|
||||
@t9 = global i32 bitcast (float bitcast (i32 8 to float) to i32) ;; Nested cast expression
|
||||
|
||||
global i32* bitcast (float* @4 to i32*) ;; Forward numeric reference
|
||||
global float* @4 ;; Duplicate forward numeric reference
|
||||
global float 0.0
|
||||
@2 = global i32* bitcast (float* @4 to i32*) ;; Forward numeric reference
|
||||
@3 = global float* @4 ;; Duplicate forward numeric reference
|
||||
@4 = global float 0.0
|
||||
|
||||
|
||||
;;---------------------------------------------------
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
@t2 = global i32* @t1
|
||||
|
||||
global float * @2 ;; Forward numeric reference
|
||||
global float * @2 ;; Duplicate forward numeric reference
|
||||
global float 0.0
|
||||
global float * @2 ;; Numeric reference
|
||||
@0 = global float * @2 ;; Forward numeric reference
|
||||
@1 = global float * @2 ;; Duplicate forward numeric reference
|
||||
@2 = global float 0.0
|
||||
@3 = global float * @2 ;; Numeric reference
|
||||
|
||||
|
||||
@fptr = global void() * @f ;; Forward ref method defn
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
@MyVar = external global i32 ; <i32*> [#uses=1]
|
||||
@MyIntList = external global { i32*, i32 } ; <{ \2*, i32 }*> [#uses=1]
|
||||
external global i32 ; <i32*>:0 [#uses=0]
|
||||
@0 = external global i32 ; <i32*>:0 [#uses=0]
|
||||
@AConst = constant i32 123 ; <i32*> [#uses=0]
|
||||
@AString = constant [4 x i8] c"test" ; <[4 x i8]*> [#uses=0]
|
||||
@ZeroInit = global { [100 x i32], [40 x float] } zeroinitializer ; <{ [100 x i32], [40 x float] }*> [#uses=0]
|
||||
@ -16,5 +16,5 @@ define i32 @foo(i32 %blah) {
|
||||
ret i32 %blah
|
||||
}
|
||||
|
||||
hidden dllexport global i32 42
|
||||
dllexport global i32 42
|
||||
@1 = hidden dllexport global i32 42
|
||||
@2 = dllexport global i32 42
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
@somestr = constant [11 x i8] c"hello world" ; <[11 x i8]*> [#uses=1]
|
||||
@array = constant [2 x i32] [ i32 12, i32 52 ] ; <[2 x i32]*> [#uses=1]
|
||||
constant { i32, i32 } { i32 4, i32 3 } ; <{ i32, i32 }*>:0 [#uses=0]
|
||||
@0 = constant { i32, i32 } { i32 4, i32 3 } ; <{ i32, i32 }*>:0 [#uses=0]
|
||||
|
||||
define [2 x i32]* @testfunction(i32 %i0, i32 %j0) {
|
||||
ret [2 x i32]* @array
|
||||
|
@ -11,8 +11,8 @@
|
||||
;; Test constant cast expressions
|
||||
;;-------------------------------
|
||||
|
||||
global i63 u0x00001 ; hexadecimal unsigned integer constants
|
||||
global i63 s0x012312 ; hexadecimal signed integer constants
|
||||
@0 = global i63 u0x00001 ; hexadecimal unsigned integer constants
|
||||
@1 = global i63 s0x012312 ; hexadecimal signed integer constants
|
||||
|
||||
@t2 = global i33* @t1 ;; Forward reference without cast
|
||||
@t3 = global i33* bitcast (i33* @t1 to i33*) ;; Forward reference with cast
|
||||
@ -24,9 +24,9 @@ global i63 s0x012312 ; hexadecimal signed integer constants
|
||||
@t9 = global i33 fptosi (float sitofp (i33 8 to float) to i33) ;; Nested cast expression
|
||||
|
||||
|
||||
global i32* bitcast (float* @4 to i32*) ;; Forward numeric reference
|
||||
global float* @4 ;; Duplicate forward numeric reference
|
||||
global float 0.0
|
||||
@2 = global i32* bitcast (float* @4 to i32*) ;; Forward numeric reference
|
||||
@3 = global float* @4 ;; Duplicate forward numeric reference
|
||||
@4 = global float 0.0
|
||||
|
||||
|
||||
;;---------------------------------------------------
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
@t2 = global i40 * @t1
|
||||
|
||||
global float * @2 ;; Forward numeric reference
|
||||
global float * @2 ;; Duplicate forward numeric reference
|
||||
global float 0.0
|
||||
global float * @2 ;; Numeric reference
|
||||
@0 = global float * @2 ;; Forward numeric reference
|
||||
@1 = global float * @2 ;; Duplicate forward numeric reference
|
||||
@2 = global float 0.0
|
||||
@3 = global float * @2 ;; Numeric reference
|
||||
|
||||
|
||||
@fptr = global void() * @f ;; Forward ref method defn
|
||||
|
@ -5,7 +5,7 @@
|
||||
%M = type opaque
|
||||
|
||||
; GLobal using the resolved function prototype
|
||||
global void (%M*)* @foo ; <void (%M*)**>:0 [#uses=0]
|
||||
@0 = global void (%M*)* @foo ; <void (%M*)**>:0 [#uses=0]
|
||||
|
||||
define void @foo.upgrd.1(i32* %V) {
|
||||
ret void
|
||||
|
@ -8,7 +8,7 @@ target triple = "i686-apple-darwin8"
|
||||
%struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
|
||||
@_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=2]
|
||||
@_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=7]
|
||||
internal constant %struct.__builtin_CFString {
|
||||
@0 = internal constant %struct.__builtin_CFString {
|
||||
i32* getelementptr ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0),
|
||||
i32 1992,
|
||||
i8* getelementptr ([14 x i8], [14 x i8]* @.str, i32 0, i32 0),
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: opt < %s -globalopt -S | FileCheck %s
|
||||
|
||||
global i32 0
|
||||
@0 = global i32 0
|
||||
; CHECK-DAG: @0 = internal global i32 0
|
||||
|
||||
private global i32 0
|
||||
@1 = private global i32 0
|
||||
; CHECK-DAG: @1 = private global i32 0
|
||||
|
||||
define i32* @2() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user