mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[opaque pointer type] Add textual IR support for explicit type parameter for global aliases
update.py: import fileinput import sys import re alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias" plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)") cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)") gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)") def conv(line): m = re.match(cast, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(gep, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(plain, line) if m: return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n" return line for line in sys.stdin: sys.stdout.write(conv(line)) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh llvm-svn: 247378
This commit is contained in:
parent
80f8717336
commit
65b92c4f37
@ -678,6 +678,12 @@ bool LLParser::ParseAlias(const std::string &Name, LocTy NameLoc, unsigned L,
|
||||
return Error(NameLoc,
|
||||
"symbol with local linkage must have default visibility");
|
||||
|
||||
Type *Ty;
|
||||
LocTy ExplicitTypeLoc = Lex.getLoc();
|
||||
if (ParseType(Ty) ||
|
||||
ParseToken(lltok::comma, "expected comma after alias's type"))
|
||||
return true;
|
||||
|
||||
Constant *Aliasee;
|
||||
LocTy AliaseeLoc = Lex.getLoc();
|
||||
if (Lex.getKind() != lltok::kw_bitcast &&
|
||||
@ -701,6 +707,11 @@ bool LLParser::ParseAlias(const std::string &Name, LocTy NameLoc, unsigned L,
|
||||
if (!PTy)
|
||||
return Error(AliaseeLoc, "An alias must have pointer type");
|
||||
|
||||
if (Ty != PTy->getElementType())
|
||||
return Error(
|
||||
ExplicitTypeLoc,
|
||||
"explicit pointee type doesn't match operand's pointee type");
|
||||
|
||||
// Okay, create the alias but do not insert it into the module yet.
|
||||
std::unique_ptr<GlobalAlias> GA(
|
||||
GlobalAlias::create(PTy, (GlobalValue::LinkageTypes)Linkage, Name,
|
||||
|
@ -2409,6 +2409,10 @@ void AssemblyWriter::printAlias(const GlobalAlias *GA) {
|
||||
|
||||
Out << "alias ";
|
||||
|
||||
TypePrinter.print(GA->getValueType(), Out);
|
||||
|
||||
Out << ", ";
|
||||
|
||||
const Constant *Aliasee = GA->getAliasee();
|
||||
|
||||
if (!Aliasee) {
|
||||
|
@ -9,7 +9,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
%struct.usb_hcd = type { %struct.usb_bus, i64, [0 x i64] }
|
||||
@uhci_pci_ids = constant [1 x %struct.pci_device_id] zeroinitializer
|
||||
|
||||
@__mod_pci_device_table = alias [1 x %struct.pci_device_id]* @uhci_pci_ids
|
||||
@__mod_pci_device_table = alias [1 x %struct.pci_device_id], [1 x %struct.pci_device_id]* @uhci_pci_ids
|
||||
; <[1 x %struct.pci_device_id]*> [#uses=0]
|
||||
|
||||
define i32 @uhci_suspend(%struct.usb_hcd* %hcd) {
|
||||
|
@ -9,7 +9,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
%struct.usb_hcd = type { %struct.usb_bus, [0 x i64] }
|
||||
@pci_ids = constant [1 x %struct.pci_device_id] zeroinitializer
|
||||
|
||||
@__mod_pci_device_table = alias [1 x %struct.pci_device_id]* @pci_ids ; <[1 x %struct.pci_device_id]*> [#uses=0]
|
||||
@__mod_pci_device_table = alias [1 x %struct.pci_device_id], [1 x %struct.pci_device_id]* @pci_ids ; <[1 x %struct.pci_device_id]*> [#uses=0]
|
||||
|
||||
define i32 @ehci_pci_setup(%struct.usb_hcd* %hcd) {
|
||||
entry:
|
||||
|
@ -3,7 +3,7 @@
|
||||
; PR1645
|
||||
|
||||
@__gthread_active_ptr.5335 = internal constant i8* bitcast (i32 (i32)* @__gthrw_pthread_cancel to i8*)
|
||||
@__gthrw_pthread_cancel = weak alias i32 (i32)* @pthread_cancel
|
||||
@__gthrw_pthread_cancel = weak alias i32 (i32), i32 (i32)* @pthread_cancel
|
||||
|
||||
|
||||
|
||||
|
@ -43,8 +43,8 @@ target datalayout = "p:32:32"
|
||||
@empty.cmp = global i1 icmp eq ([0 x i8]* @empty.1, [0 x i8]* @empty.2)
|
||||
|
||||
; Don't add an inbounds on @glob.a3, since it's not inbounds.
|
||||
; CHECK: @glob.a3 = alias getelementptr (i32, i32* @glob.a2, i32 1)
|
||||
; CHECK: @glob.a3 = alias i32, getelementptr (i32, i32* @glob.a2, i32 1)
|
||||
@glob = global i32 0
|
||||
@glob.a3 = alias getelementptr (i32, i32* @glob.a2, i32 1)
|
||||
@glob.a2 = alias getelementptr (i32, i32* @glob.a1, i32 1)
|
||||
@glob.a1 = alias i32* @glob
|
||||
@glob.a3 = alias i32, getelementptr (i32, i32* @glob.a2, i32 1)
|
||||
@glob.a2 = alias i32, getelementptr (i32, i32* @glob.a1, i32 1)
|
||||
@glob.a1 = alias i32, i32* @glob
|
||||
|
@ -4,5 +4,5 @@
|
||||
; Test that global aliases are allowed to be constant addrspacecast
|
||||
|
||||
@i = internal addrspace(1) global i8 42
|
||||
@ia = internal alias addrspacecast (i8 addrspace(1)* @i to i8 addrspace(2)* addrspace(3)*)
|
||||
; CHECK: @ia = internal alias addrspacecast (i8 addrspace(2)* addrspace(1)* bitcast (i8 addrspace(1)* @i to i8 addrspace(2)* addrspace(1)*) to i8 addrspace(2)* addrspace(3)*)
|
||||
@ia = internal alias i8 addrspace(2)*, addrspacecast (i8 addrspace(1)* @i to i8 addrspace(2)* addrspace(3)*)
|
||||
; CHECK: @ia = internal alias i8 addrspace(2)*, addrspacecast (i8 addrspace(2)* addrspace(1)* bitcast (i8 addrspace(1)* @i to i8 addrspace(2)* addrspace(1)*) to i8 addrspace(2)* addrspace(3)*)
|
||||
|
@ -3,5 +3,5 @@
|
||||
; CHECK: error: redefinition of global named '@bar'
|
||||
|
||||
@foo = global i32 0
|
||||
@bar = alias i32* @foo
|
||||
@bar = alias i32* @foo
|
||||
@bar = alias i32, i32* @foo
|
||||
@bar = alias i32, i32* @foo
|
||||
|
@ -6,6 +6,6 @@
|
||||
@alias.ref2 = global i32* getelementptr inbounds (i32, i32* @alias, i64 1)
|
||||
|
||||
; Aliases.
|
||||
@alias = alias i32* @global
|
||||
@alias.ref3 = alias i32* getelementptr inbounds (i32, i32* @alias, i64 1)
|
||||
@alias.ref4 = alias i32* getelementptr inbounds (i32, i32* @alias, i64 1)
|
||||
@alias = alias i32, i32* @global
|
||||
@alias.ref3 = alias i32, getelementptr inbounds (i32, i32* @alias, i64 1)
|
||||
@alias.ref4 = alias i32, getelementptr inbounds (i32, i32* @alias, i64 1)
|
||||
|
@ -5,8 +5,8 @@
|
||||
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"
|
||||
|
||||
@f = alias void ()* @0 ; <void ()*> [#uses=0]
|
||||
@g = alias void ()* @1 ; <void ()*> [#uses=0]
|
||||
@f = alias void (), void ()* @0 ; <void ()*> [#uses=0]
|
||||
@g = alias void (), void ()* @1 ; <void ()*> [#uses=0]
|
||||
@h = external global void ()* ; <void ()*> [#uses=0]
|
||||
|
||||
define internal void @0() nounwind {
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
@global = global i32 0
|
||||
|
||||
@alias = internal hidden alias i32* @global
|
||||
@alias = internal hidden alias i32, i32* @global
|
||||
; CHECK: symbol with local linkage must have default visibility
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
@global = global i32 0
|
||||
|
||||
@alias = internal protected alias i32* @global
|
||||
@alias = internal protected alias i32, i32* @global
|
||||
; CHECK: symbol with local linkage must have default visibility
|
||||
|
4
test/Assembler/invalid-alias-mismatched-explicit-type.ll
Normal file
4
test/Assembler/invalid-alias-mismatched-explicit-type.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
; CHECK: <stdin>:4:12: error: explicit pointee type doesn't match operand's pointee type
|
||||
@y = global i2 0
|
||||
@x = alias i1, i2* @y
|
@ -1,4 +1,4 @@
|
||||
; RUN: not llvm-as %s -disable-output 2>&1 | grep "forward reference and definition of global have different types"
|
||||
|
||||
@a2 = alias void ()* @g2
|
||||
@a2 = alias void (), void ()* @g2
|
||||
@g2 = internal global i8 42
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
; CHECK: error: expected distinct uselistorder indexes in range [0, size)
|
||||
@global = global i32 0
|
||||
@alias1 = alias i32* @global
|
||||
@alias2 = alias i32* @global
|
||||
@alias3 = alias i32* @global
|
||||
@alias1 = alias i32, i32* @global
|
||||
@alias2 = alias i32, i32* @global
|
||||
@alias3 = alias i32, i32* @global
|
||||
uselistorder i32* @global, { 0, 0, 2 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
; CHECK: error: value only has one use
|
||||
@global = global i32 0
|
||||
@alias = alias i32* @global
|
||||
@alias = alias i32, i32* @global
|
||||
uselistorder i32* @global, { 1, 0 }
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
; CHECK: error: expected uselistorder indexes to change the order
|
||||
@global = global i32 0
|
||||
@alias1 = alias i32* @global
|
||||
@alias2 = alias i32* @global
|
||||
@alias3 = alias i32* @global
|
||||
@alias1 = alias i32, i32* @global
|
||||
@alias2 = alias i32, i32* @global
|
||||
@alias3 = alias i32, i32* @global
|
||||
uselistorder i32* @global, { 0, 1, 2 }
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
; CHECK: error: expected distinct uselistorder indexes in range [0, size)
|
||||
@global = global i32 0
|
||||
@alias1 = alias i32* @global
|
||||
@alias2 = alias i32* @global
|
||||
@alias3 = alias i32* @global
|
||||
@alias1 = alias i32, i32* @global
|
||||
@alias2 = alias i32, i32* @global
|
||||
@alias3 = alias i32, i32* @global
|
||||
uselistorder i32* @global, { 0, 3, 1 }
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
; CHECK: error: wrong number of indexes, expected 3
|
||||
@global = global i32 0
|
||||
@alias1 = alias i32* @global
|
||||
@alias2 = alias i32* @global
|
||||
@alias3 = alias i32* @global
|
||||
@alias1 = alias i32, i32* @global
|
||||
@alias2 = alias i32, i32* @global
|
||||
@alias3 = alias i32, i32* @global
|
||||
uselistorder i32* @global, { 1, 0 }
|
||||
|
@ -1,6 +1,6 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
; CHECK: error: wrong number of indexes, expected 2
|
||||
@global = global i32 0
|
||||
@alias1 = alias i32* @global
|
||||
@alias2 = alias i32* @global
|
||||
@alias1 = alias i32, i32* @global
|
||||
@alias2 = alias i32, i32* @global
|
||||
uselistorder i32* @global, { 1, 0, 2 }
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
@global = global i32 0
|
||||
|
||||
@alias = private hidden alias i32* @global
|
||||
@alias = private hidden alias i32, i32* @global
|
||||
; CHECK: symbol with local linkage must have default visibility
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
@global = global i32 0
|
||||
|
||||
@alias = private protected alias i32* @global
|
||||
@alias = private protected alias i32, i32* @global
|
||||
; CHECK: symbol with local linkage must have default visibility
|
||||
|
@ -5,7 +5,7 @@
|
||||
@1 = private constant i32 1
|
||||
; CHECK: @1 = private constant i32 1
|
||||
|
||||
@2 = private alias i32* @0
|
||||
; CHECK: @2 = private alias i32* @0
|
||||
@3 = private alias i32* @1
|
||||
; CHECK: @3 = private alias i32* @1
|
||||
@2 = private alias i32, i32* @0
|
||||
; CHECK: @2 = private alias i32, i32* @0
|
||||
@3 = private alias i32, i32* @1
|
||||
; CHECK: @3 = private alias i32, i32* @1
|
||||
|
@ -4,7 +4,7 @@
|
||||
; RUN: verify-uselistorder < %s
|
||||
|
||||
@a = global [4 x i1] [i1 0, i1 1, i1 0, i1 1]
|
||||
@b = alias getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
|
||||
@b = alias i1, getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
|
||||
|
||||
; Check use-list order of constants used by globals.
|
||||
@glob1 = global i5 7
|
||||
|
@ -174,52 +174,52 @@ declare void @g.f1()
|
||||
; [unnamed_addr] alias <AliaseeTy> @<Aliasee>
|
||||
|
||||
; Aliases -- Linkage
|
||||
@a.private = private alias i32* @g.private
|
||||
; CHECK: @a.private = private alias i32* @g.private
|
||||
@a.internal = internal alias i32* @g.internal
|
||||
; CHECK: @a.internal = internal alias i32* @g.internal
|
||||
@a.linkonce = linkonce alias i32* @g.linkonce
|
||||
; CHECK: @a.linkonce = linkonce alias i32* @g.linkonce
|
||||
@a.weak = weak alias i32* @g.weak
|
||||
; CHECK: @a.weak = weak alias i32* @g.weak
|
||||
@a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr
|
||||
; CHECK: @a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr
|
||||
@a.weak_odr = weak_odr alias i32* @g.weak_odr
|
||||
; CHECK: @a.weak_odr = weak_odr alias i32* @g.weak_odr
|
||||
@a.external = external alias i32* @g1
|
||||
; CHECK: @a.external = alias i32* @g1
|
||||
@a.private = private alias i32, i32* @g.private
|
||||
; CHECK: @a.private = private alias i32, i32* @g.private
|
||||
@a.internal = internal alias i32, i32* @g.internal
|
||||
; CHECK: @a.internal = internal alias i32, i32* @g.internal
|
||||
@a.linkonce = linkonce alias i32, i32* @g.linkonce
|
||||
; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce
|
||||
@a.weak = weak alias i32, i32* @g.weak
|
||||
; CHECK: @a.weak = weak alias i32, i32* @g.weak
|
||||
@a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
|
||||
; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
|
||||
@a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
|
||||
; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
|
||||
@a.external = external alias i32, i32* @g1
|
||||
; CHECK: @a.external = alias i32, i32* @g1
|
||||
|
||||
; Aliases -- Visibility
|
||||
@a.default = default alias i32* @g.default
|
||||
; CHECK: @a.default = alias i32* @g.default
|
||||
@a.hidden = hidden alias i32* @g.hidden
|
||||
; CHECK: @a.hidden = hidden alias i32* @g.hidden
|
||||
@a.protected = protected alias i32* @g.protected
|
||||
; CHECK: @a.protected = protected alias i32* @g.protected
|
||||
@a.default = default alias i32, i32* @g.default
|
||||
; CHECK: @a.default = alias i32, i32* @g.default
|
||||
@a.hidden = hidden alias i32, i32* @g.hidden
|
||||
; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden
|
||||
@a.protected = protected alias i32, i32* @g.protected
|
||||
; CHECK: @a.protected = protected alias i32, i32* @g.protected
|
||||
|
||||
; Aliases -- DLLStorageClass
|
||||
@a.dlldefault = default alias i32* @g.dlldefault
|
||||
; CHECK: @a.dlldefault = alias i32* @g.dlldefault
|
||||
@a.dllimport = dllimport alias i32* @g1
|
||||
; CHECK: @a.dllimport = dllimport alias i32* @g1
|
||||
@a.dllexport = dllexport alias i32* @g.dllexport
|
||||
; CHECK: @a.dllexport = dllexport alias i32* @g.dllexport
|
||||
@a.dlldefault = default alias i32, i32* @g.dlldefault
|
||||
; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault
|
||||
@a.dllimport = dllimport alias i32, i32* @g1
|
||||
; CHECK: @a.dllimport = dllimport alias i32, i32* @g1
|
||||
@a.dllexport = dllexport alias i32, i32* @g.dllexport
|
||||
; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport
|
||||
|
||||
; Aliases -- ThreadLocal
|
||||
@a.notthreadlocal = alias i32* @g.notthreadlocal
|
||||
; CHECK: @a.notthreadlocal = alias i32* @g.notthreadlocal
|
||||
@a.generaldynamic = thread_local alias i32* @g.generaldynamic
|
||||
; CHECK: @a.generaldynamic = thread_local alias i32* @g.generaldynamic
|
||||
@a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic
|
||||
; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic
|
||||
@a.initialexec = thread_local(initialexec) alias i32* @g.initialexec
|
||||
; CHECK: @a.initialexec = thread_local(initialexec) alias i32* @g.initialexec
|
||||
@a.localexec = thread_local(localexec) alias i32* @g.localexec
|
||||
; CHECK: @a.localexec = thread_local(localexec) alias i32* @g.localexec
|
||||
@a.notthreadlocal = alias i32, i32* @g.notthreadlocal
|
||||
; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal
|
||||
@a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
|
||||
; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
|
||||
@a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
|
||||
; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
|
||||
@a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
|
||||
; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
|
||||
@a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
|
||||
; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
|
||||
|
||||
; Aliases -- unnamed_addr
|
||||
@a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr
|
||||
; CHECK: @a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr
|
||||
@a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
|
||||
; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
|
||||
|
||||
;; Functions
|
||||
; Format: define [linkage] [visibility] [DLLStorageClass]
|
||||
|
@ -174,52 +174,52 @@ declare void @g.f1()
|
||||
; [unnamed_addr] alias <AliaseeTy> @<Aliasee>
|
||||
|
||||
; Aliases -- Linkage
|
||||
@a.private = private alias i32* @g.private
|
||||
; CHECK: @a.private = private alias i32* @g.private
|
||||
@a.internal = internal alias i32* @g.internal
|
||||
; CHECK: @a.internal = internal alias i32* @g.internal
|
||||
@a.linkonce = linkonce alias i32* @g.linkonce
|
||||
; CHECK: @a.linkonce = linkonce alias i32* @g.linkonce
|
||||
@a.weak = weak alias i32* @g.weak
|
||||
; CHECK: @a.weak = weak alias i32* @g.weak
|
||||
@a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr
|
||||
; CHECK: @a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr
|
||||
@a.weak_odr = weak_odr alias i32* @g.weak_odr
|
||||
; CHECK: @a.weak_odr = weak_odr alias i32* @g.weak_odr
|
||||
@a.external = external alias i32* @g1
|
||||
; CHECK: @a.external = alias i32* @g1
|
||||
@a.private = private alias i32, i32* @g.private
|
||||
; CHECK: @a.private = private alias i32, i32* @g.private
|
||||
@a.internal = internal alias i32, i32* @g.internal
|
||||
; CHECK: @a.internal = internal alias i32, i32* @g.internal
|
||||
@a.linkonce = linkonce alias i32, i32* @g.linkonce
|
||||
; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce
|
||||
@a.weak = weak alias i32, i32* @g.weak
|
||||
; CHECK: @a.weak = weak alias i32, i32* @g.weak
|
||||
@a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
|
||||
; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
|
||||
@a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
|
||||
; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
|
||||
@a.external = external alias i32, i32* @g1
|
||||
; CHECK: @a.external = alias i32, i32* @g1
|
||||
|
||||
; Aliases -- Visibility
|
||||
@a.default = default alias i32* @g.default
|
||||
; CHECK: @a.default = alias i32* @g.default
|
||||
@a.hidden = hidden alias i32* @g.hidden
|
||||
; CHECK: @a.hidden = hidden alias i32* @g.hidden
|
||||
@a.protected = protected alias i32* @g.protected
|
||||
; CHECK: @a.protected = protected alias i32* @g.protected
|
||||
@a.default = default alias i32, i32* @g.default
|
||||
; CHECK: @a.default = alias i32, i32* @g.default
|
||||
@a.hidden = hidden alias i32, i32* @g.hidden
|
||||
; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden
|
||||
@a.protected = protected alias i32, i32* @g.protected
|
||||
; CHECK: @a.protected = protected alias i32, i32* @g.protected
|
||||
|
||||
; Aliases -- DLLStorageClass
|
||||
@a.dlldefault = default alias i32* @g.dlldefault
|
||||
; CHECK: @a.dlldefault = alias i32* @g.dlldefault
|
||||
@a.dllimport = dllimport alias i32* @g1
|
||||
; CHECK: @a.dllimport = dllimport alias i32* @g1
|
||||
@a.dllexport = dllexport alias i32* @g.dllexport
|
||||
; CHECK: @a.dllexport = dllexport alias i32* @g.dllexport
|
||||
@a.dlldefault = default alias i32, i32* @g.dlldefault
|
||||
; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault
|
||||
@a.dllimport = dllimport alias i32, i32* @g1
|
||||
; CHECK: @a.dllimport = dllimport alias i32, i32* @g1
|
||||
@a.dllexport = dllexport alias i32, i32* @g.dllexport
|
||||
; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport
|
||||
|
||||
; Aliases -- ThreadLocal
|
||||
@a.notthreadlocal = alias i32* @g.notthreadlocal
|
||||
; CHECK: @a.notthreadlocal = alias i32* @g.notthreadlocal
|
||||
@a.generaldynamic = thread_local alias i32* @g.generaldynamic
|
||||
; CHECK: @a.generaldynamic = thread_local alias i32* @g.generaldynamic
|
||||
@a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic
|
||||
; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic
|
||||
@a.initialexec = thread_local(initialexec) alias i32* @g.initialexec
|
||||
; CHECK: @a.initialexec = thread_local(initialexec) alias i32* @g.initialexec
|
||||
@a.localexec = thread_local(localexec) alias i32* @g.localexec
|
||||
; CHECK: @a.localexec = thread_local(localexec) alias i32* @g.localexec
|
||||
@a.notthreadlocal = alias i32, i32* @g.notthreadlocal
|
||||
; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal
|
||||
@a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
|
||||
; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
|
||||
@a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
|
||||
; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
|
||||
@a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
|
||||
; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
|
||||
@a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
|
||||
; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
|
||||
|
||||
; Aliases -- unnamed_addr
|
||||
@a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr
|
||||
; CHECK: @a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr
|
||||
@a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
|
||||
; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
|
||||
|
||||
;; Functions
|
||||
; Format: define [linkage] [visibility] [DLLStorageClass]
|
||||
|
@ -176,52 +176,52 @@ declare void @g.f1()
|
||||
; [unnamed_addr] alias <AliaseeTy> @<Aliasee>
|
||||
|
||||
; Aliases -- Linkage
|
||||
@a.private = private alias i32* @g.private
|
||||
; CHECK: @a.private = private alias i32* @g.private
|
||||
@a.internal = internal alias i32* @g.internal
|
||||
; CHECK: @a.internal = internal alias i32* @g.internal
|
||||
@a.linkonce = linkonce alias i32* @g.linkonce
|
||||
; CHECK: @a.linkonce = linkonce alias i32* @g.linkonce
|
||||
@a.weak = weak alias i32* @g.weak
|
||||
; CHECK: @a.weak = weak alias i32* @g.weak
|
||||
@a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr
|
||||
; CHECK: @a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr
|
||||
@a.weak_odr = weak_odr alias i32* @g.weak_odr
|
||||
; CHECK: @a.weak_odr = weak_odr alias i32* @g.weak_odr
|
||||
@a.external = external alias i32* @g1
|
||||
; CHECK: @a.external = alias i32* @g1
|
||||
@a.private = private alias i32, i32* @g.private
|
||||
; CHECK: @a.private = private alias i32, i32* @g.private
|
||||
@a.internal = internal alias i32, i32* @g.internal
|
||||
; CHECK: @a.internal = internal alias i32, i32* @g.internal
|
||||
@a.linkonce = linkonce alias i32, i32* @g.linkonce
|
||||
; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce
|
||||
@a.weak = weak alias i32, i32* @g.weak
|
||||
; CHECK: @a.weak = weak alias i32, i32* @g.weak
|
||||
@a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
|
||||
; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
|
||||
@a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
|
||||
; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
|
||||
@a.external = external alias i32, i32* @g1
|
||||
; CHECK: @a.external = alias i32, i32* @g1
|
||||
|
||||
; Aliases -- Visibility
|
||||
@a.default = default alias i32* @g.default
|
||||
; CHECK: @a.default = alias i32* @g.default
|
||||
@a.hidden = hidden alias i32* @g.hidden
|
||||
; CHECK: @a.hidden = hidden alias i32* @g.hidden
|
||||
@a.protected = protected alias i32* @g.protected
|
||||
; CHECK: @a.protected = protected alias i32* @g.protected
|
||||
@a.default = default alias i32, i32* @g.default
|
||||
; CHECK: @a.default = alias i32, i32* @g.default
|
||||
@a.hidden = hidden alias i32, i32* @g.hidden
|
||||
; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden
|
||||
@a.protected = protected alias i32, i32* @g.protected
|
||||
; CHECK: @a.protected = protected alias i32, i32* @g.protected
|
||||
|
||||
; Aliases -- DLLStorageClass
|
||||
@a.dlldefault = default alias i32* @g.dlldefault
|
||||
; CHECK: @a.dlldefault = alias i32* @g.dlldefault
|
||||
@a.dllimport = dllimport alias i32* @g1
|
||||
; CHECK: @a.dllimport = dllimport alias i32* @g1
|
||||
@a.dllexport = dllexport alias i32* @g.dllexport
|
||||
; CHECK: @a.dllexport = dllexport alias i32* @g.dllexport
|
||||
@a.dlldefault = default alias i32, i32* @g.dlldefault
|
||||
; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault
|
||||
@a.dllimport = dllimport alias i32, i32* @g1
|
||||
; CHECK: @a.dllimport = dllimport alias i32, i32* @g1
|
||||
@a.dllexport = dllexport alias i32, i32* @g.dllexport
|
||||
; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport
|
||||
|
||||
; Aliases -- ThreadLocal
|
||||
@a.notthreadlocal = alias i32* @g.notthreadlocal
|
||||
; CHECK: @a.notthreadlocal = alias i32* @g.notthreadlocal
|
||||
@a.generaldynamic = thread_local alias i32* @g.generaldynamic
|
||||
; CHECK: @a.generaldynamic = thread_local alias i32* @g.generaldynamic
|
||||
@a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic
|
||||
; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic
|
||||
@a.initialexec = thread_local(initialexec) alias i32* @g.initialexec
|
||||
; CHECK: @a.initialexec = thread_local(initialexec) alias i32* @g.initialexec
|
||||
@a.localexec = thread_local(localexec) alias i32* @g.localexec
|
||||
; CHECK: @a.localexec = thread_local(localexec) alias i32* @g.localexec
|
||||
@a.notthreadlocal = alias i32, i32* @g.notthreadlocal
|
||||
; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal
|
||||
@a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
|
||||
; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
|
||||
@a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
|
||||
; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
|
||||
@a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
|
||||
; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
|
||||
@a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
|
||||
; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
|
||||
|
||||
; Aliases -- unnamed_addr
|
||||
@a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr
|
||||
; CHECK: @a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr
|
||||
@a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
|
||||
; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
|
||||
|
||||
;; Functions
|
||||
; Format: define [linkage] [visibility] [DLLStorageClass]
|
||||
|
@ -19,16 +19,16 @@ module asm "some assembly"
|
||||
; Aliases Test
|
||||
; CHECK: @glob1 = global i32 1
|
||||
@glob1 = global i32 1
|
||||
; CHECK: @aliased1 = alias i32* @glob1
|
||||
@aliased1 = alias i32* @glob1
|
||||
; CHECK-NEXT: @aliased2 = internal alias i32* @glob1
|
||||
@aliased2 = internal alias i32* @glob1
|
||||
; CHECK-NEXT: @aliased3 = alias i32* @glob1
|
||||
@aliased3 = external alias i32* @glob1
|
||||
; CHECK-NEXT: @aliased4 = weak alias i32* @glob1
|
||||
@aliased4 = weak alias i32* @glob1
|
||||
; CHECK-NEXT: @aliased5 = weak_odr alias i32* @glob1
|
||||
@aliased5 = weak_odr alias i32* @glob1
|
||||
; CHECK: @aliased1 = alias i32, i32* @glob1
|
||||
@aliased1 = alias i32, i32* @glob1
|
||||
; CHECK-NEXT: @aliased2 = internal alias i32, i32* @glob1
|
||||
@aliased2 = internal alias i32, i32* @glob1
|
||||
; CHECK-NEXT: @aliased3 = alias i32, i32* @glob1
|
||||
@aliased3 = external alias i32, i32* @glob1
|
||||
; CHECK-NEXT: @aliased4 = weak alias i32, i32* @glob1
|
||||
@aliased4 = weak alias i32, i32* @glob1
|
||||
; CHECK-NEXT: @aliased5 = weak_odr alias i32, i32* @glob1
|
||||
@aliased5 = weak_odr alias i32, i32* @glob1
|
||||
|
||||
;Parameter Attribute Test
|
||||
; CHECK: declare void @ParamAttr1(i8 zeroext)
|
||||
|
@ -25,23 +25,23 @@
|
||||
|
||||
@global = global i32 0
|
||||
|
||||
@default.internal.alias = alias internal i32* @global
|
||||
; CHECK: @default.internal.alias = internal alias i32* @global
|
||||
@default.internal.alias = alias internal i32, internal i32* @global
|
||||
; CHECK: @default.internal.alias = internal alias i32, i32* @global
|
||||
|
||||
@hidden.internal.alias = hidden alias internal i32* @global
|
||||
; CHECK: @hidden.internal.alias = internal alias i32* @global
|
||||
@hidden.internal.alias = hidden alias internal i32, internal i32* @global
|
||||
; CHECK: @hidden.internal.alias = internal alias i32, i32* @global
|
||||
|
||||
@protected.internal.alias = protected alias internal i32* @global
|
||||
; CHECK: @protected.internal.alias = internal alias i32* @global
|
||||
@protected.internal.alias = protected alias internal i32, internal i32* @global
|
||||
; CHECK: @protected.internal.alias = internal alias i32, i32* @global
|
||||
|
||||
@default.private.alias = alias private i32* @global
|
||||
; CHECK: @default.private.alias = private alias i32* @global
|
||||
@default.private.alias = alias private i32, private i32* @global
|
||||
; CHECK: @default.private.alias = private alias i32, i32* @global
|
||||
|
||||
@hidden.private.alias = hidden alias private i32* @global
|
||||
; CHECK: @hidden.private.alias = private alias i32* @global
|
||||
@hidden.private.alias = hidden alias private i32, private i32* @global
|
||||
; CHECK: @hidden.private.alias = private alias i32, i32* @global
|
||||
|
||||
@protected.private.alias = protected alias private i32* @global
|
||||
; CHECK: @protected.private.alias = private alias i32* @global
|
||||
@protected.private.alias = protected alias private i32, private i32* @global
|
||||
; CHECK: @protected.private.alias = private alias i32, i32* @global
|
||||
|
||||
define internal void @default.internal() {
|
||||
; CHECK: define internal void @default.internal
|
||||
|
@ -10,14 +10,14 @@
|
||||
@v2 = global [1 x i32] zeroinitializer
|
||||
; CHECK: @v2 = global [1 x i32] zeroinitializer
|
||||
|
||||
@v3 = alias bitcast (i32* @v1 to i16*)
|
||||
; CHECK: @v3 = alias bitcast (i32* @v1 to i16*)
|
||||
@v3 = alias i16, bitcast (i32* @v1 to i16*)
|
||||
; CHECK: @v3 = alias i16, bitcast (i32* @v1 to i16*)
|
||||
|
||||
@v4 = alias getelementptr ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
|
||||
; CHECK: @v4 = alias getelementptr inbounds ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
|
||||
@v4 = alias i32, getelementptr ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
|
||||
; CHECK: @v4 = alias i32, getelementptr inbounds ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
|
||||
|
||||
@v5 = alias i32 addrspace(2)* addrspacecast (i32 addrspace(0)* @v1 to i32 addrspace(2)*)
|
||||
; CHECK: @v5 = alias addrspacecast (i32* @v1 to i32 addrspace(2)*)
|
||||
@v5 = alias i32, i32 addrspace(2)* addrspacecast (i32 addrspace(0)* @v1 to i32 addrspace(2)*)
|
||||
; CHECK: @v5 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*)
|
||||
|
||||
@v6 = alias i16* @v3
|
||||
; CHECK: @v6 = alias i16* @v3
|
||||
@v6 = alias i16, i16* @v3
|
||||
; CHECK: @v6 = alias i16, i16* @v3
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: verify-uselistorder < %s
|
||||
|
||||
@a = global [4 x i1] [i1 0, i1 1, i1 0, i1 1]
|
||||
@b = alias i1* getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
|
||||
@b = alias i1, getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
|
||||
|
||||
; Check use-list order of constants used by globals.
|
||||
@glob1 = global i5 7
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
; Check use-list order between variables and aliases.
|
||||
@target = global i3 zeroinitializer
|
||||
@alias1 = alias i3* @target
|
||||
@alias2 = alias i3* @target
|
||||
@alias3 = alias i3* @target
|
||||
@alias1 = alias i3, i3* @target
|
||||
@alias2 = alias i3, i3* @target
|
||||
@alias3 = alias i3, i3* @target
|
||||
@var1 = global i3* @target
|
||||
@var2 = global i3* @target
|
||||
@var3 = global i3* @target
|
||||
@ -31,9 +31,9 @@
|
||||
|
||||
; Same as above, but for aliases.
|
||||
@const.target = global i62 1
|
||||
@const.alias = alias i62* @const.target
|
||||
@const.alias.ptr = alias i62* @const.alias
|
||||
@const.alias.2 = alias i62* @const.target
|
||||
@const.alias = alias i62, i62* @const.target
|
||||
@const.alias.ptr = alias i62, i62* @const.alias
|
||||
@const.alias.2 = alias i62, i62* @const.target
|
||||
|
||||
define i64 @f(i64 %f) {
|
||||
entry:
|
||||
|
@ -3,7 +3,7 @@
|
||||
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
|
||||
; REQUIRES: loadable_module
|
||||
|
||||
@foo2 = alias i32 ()* @foo
|
||||
@foo2 = alias i32 (), i32 ()* @foo
|
||||
|
||||
define i32 @foo() { ret i32 1 }
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
@var32 = global [3 x i32] zeroinitializer
|
||||
@var64 = global [3 x i64] zeroinitializer
|
||||
@var32_align64 = global [3 x i32] zeroinitializer, align 8
|
||||
@alias = alias [3 x i32]* @var32_align64
|
||||
@alias = alias [3 x i32], [3 x i32]* @var32_align64
|
||||
|
||||
define i64 @test_align32() {
|
||||
; CHECK-LABEL: test_align32:
|
||||
|
@ -20,7 +20,7 @@
|
||||
@.str51 = external constant [45 x i8] ; <[45 x i8]*> [#uses=1]
|
||||
@__PRETTY_FUNCTION__._ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs = external constant [116 x i8] ; <[116 x i8]*> [#uses=1]
|
||||
|
||||
@_ZN4llvm9RecordValC1ERKSsPNS_5RecTyEj = alias void (%"class.llvm::RecordVal"*, %"class.std::basic_string"*, %"struct.llvm::Init"*, i32)* @_ZN4llvm9RecordValC2ERKSsPNS_5RecTyEj ; <void (%"class.llvm::RecordVal"*, %"class.std::basic_string"*, %"struct.llvm::Init"*, i32)*> [#uses=0]
|
||||
@_ZN4llvm9RecordValC1ERKSsPNS_5RecTyEj = alias void (%"class.llvm::RecordVal"*, %"class.std::basic_string"*, %"struct.llvm::Init"*, i32), void (%"class.llvm::RecordVal"*, %"class.std::basic_string"*, %"struct.llvm::Init"*, i32)* @_ZN4llvm9RecordValC2ERKSsPNS_5RecTyEj ; <void (%"class.llvm::RecordVal"*, %"class.std::basic_string"*, %"struct.llvm::Init"*, i32)*> [#uses=0]
|
||||
|
||||
declare i8* @__dynamic_cast(i8*, i8*, i8*, i32)
|
||||
|
||||
|
@ -33,23 +33,23 @@
|
||||
; CHECK: .size elem1, 4
|
||||
|
||||
@bar = global i32 42
|
||||
@foo1 = alias i32* @bar
|
||||
@foo2 = alias i32* @bar
|
||||
@foo1 = alias i32, i32* @bar
|
||||
@foo2 = alias i32, i32* @bar
|
||||
|
||||
%FunTy = type i32()
|
||||
|
||||
define i32 @foo_f() {
|
||||
ret i32 0
|
||||
}
|
||||
@bar_f = weak alias %FunTy* @foo_f
|
||||
@bar_f = weak alias %FunTy, %FunTy* @foo_f
|
||||
|
||||
@bar_i = internal alias i32* @bar
|
||||
@bar_i = internal alias i32, i32* @bar
|
||||
|
||||
@A = alias bitcast (i32* @bar to i64*)
|
||||
@A = alias i64, bitcast (i32* @bar to i64*)
|
||||
|
||||
@structvar = private global {i32, i32} {i32 1, i32 2}
|
||||
@elem0 = alias getelementptr({i32, i32}, {i32, i32}* @structvar, i32 0, i32 0)
|
||||
@elem1 = alias getelementptr({i32, i32}, {i32, i32}* @structvar, i32 0, i32 1)
|
||||
@elem0 = alias i32, getelementptr({i32, i32}, {i32, i32}* @structvar, i32 0, i32 0)
|
||||
@elem1 = alias i32, getelementptr({i32, i32}, {i32, i32}* @structvar, i32 0, i32 1)
|
||||
|
||||
define i32 @test() {
|
||||
entry:
|
||||
|
@ -30,20 +30,20 @@
|
||||
%"struct.qdesigner_internal::GridLayout" = type { %"struct.qdesigner_internal::Layout", %"struct.QPair<int,int>", %"struct.qdesigner_internal::Grid"* }
|
||||
%"struct.qdesigner_internal::Layout" = type { %struct.QObject, %"struct.QList<QAbstractExtensionFactory*>", %struct.QWidget*, %"struct.QHash<QString,QList<QAbstractExtensionFactory*> >", %struct.QWidget*, %struct.QDesignerFormWindowInterface*, i8, %"struct.QPair<int,int>", %struct.QRect, i8 }
|
||||
|
||||
@_ZL20__gthrw_pthread_oncePiPFvvE = weak alias i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_getspecificj = weak alias i8* (i32)* @pthread_getspecific ; <i8* (i32)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_setspecificjPKv = weak alias i32 (i32, i8*)* @pthread_setspecific ; <i32 (i32, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = weak alias i32 (i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; <i32 (i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_cancelm = weak alias i32 (i64)* @pthread_cancel ; <i32 (i64)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = weak alias i32 (%struct.pthread_mutex_t*, %struct.Alignment*)* @pthread_mutex_init ; <i32 (%struct.pthread_mutex_t*, %struct.Alignment*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_createPjPFvPvE = weak alias i32 (i32*, void (i8*)*)* @pthread_key_create ; <i32 (i32*, void (i8*)*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_deletej = weak alias i32 (i32)* @pthread_key_delete ; <i32 (i32)*> [#uses=0]
|
||||
@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = weak alias i32 (%struct.Alignment*)* @pthread_mutexattr_init ; <i32 (%struct.Alignment*)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = weak alias i32 (%struct.Alignment*, i32)* @pthread_mutexattr_settype ; <i32 (%struct.Alignment*, i32)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = weak alias i32 (%struct.Alignment*)* @pthread_mutexattr_destroy ; <i32 (%struct.Alignment*)*> [#uses=0]
|
||||
@_ZL20__gthrw_pthread_oncePiPFvvE = weak alias i32 (i32*, void ()*), i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_getspecificj = weak alias i8* (i32), i8* (i32)* @pthread_getspecific ; <i8* (i32)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_setspecificjPKv = weak alias i32 (i32, i8*), i32 (i32, i8*)* @pthread_setspecific ; <i32 (i32, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = weak alias i32 (i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*), i32 (i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; <i32 (i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_cancelm = weak alias i32 (i64), i32 (i64)* @pthread_cancel ; <i32 (i64)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = weak alias i32 (%struct.pthread_mutex_t*, %struct.Alignment*), i32 (%struct.pthread_mutex_t*, %struct.Alignment*)* @pthread_mutex_init ; <i32 (%struct.pthread_mutex_t*, %struct.Alignment*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_createPjPFvPvE = weak alias i32 (i32*, void (i8*)*), i32 (i32*, void (i8*)*)* @pthread_key_create ; <i32 (i32*, void (i8*)*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_deletej = weak alias i32 (i32), i32 (i32)* @pthread_key_delete ; <i32 (i32)*> [#uses=0]
|
||||
@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = weak alias i32 (%struct.Alignment*), i32 (%struct.Alignment*)* @pthread_mutexattr_init ; <i32 (%struct.Alignment*)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = weak alias i32 (%struct.Alignment*, i32), i32 (%struct.Alignment*, i32)* @pthread_mutexattr_settype ; <i32 (%struct.Alignment*, i32)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = weak alias i32 (%struct.Alignment*), i32 (%struct.Alignment*)* @pthread_mutexattr_destroy ; <i32 (%struct.Alignment*)*> [#uses=0]
|
||||
|
||||
define void @_ZN18qdesigner_internal10GridLayout9buildGridEv(%"struct.qdesigner_internal::GridLayout"* %this) nounwind {
|
||||
entry:
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: llc -march=mipsel -relocation-model=pic -disable-mips-delay-filler < %s | FileCheck %s
|
||||
|
||||
@foo = thread_local global i32 42
|
||||
@bar = hidden thread_local alias i32* @foo
|
||||
@bar = hidden thread_local alias i32, i32* @foo
|
||||
|
||||
define i32* @zed() {
|
||||
; CHECK-DAG: __tls_get_addr
|
||||
|
@ -2,10 +2,10 @@
|
||||
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=large | FileCheck --check-prefix=CHECK --check-prefix=LARGE %s
|
||||
|
||||
@foo = global i32 42
|
||||
@fooa = alias i32* @foo
|
||||
@fooa = alias i32, i32* @foo
|
||||
|
||||
@foo2 = global i64 42
|
||||
@foo2a = alias i64* @foo2
|
||||
@foo2a = alias i64, i64* @foo2
|
||||
|
||||
; CHECK-LABEL: bar:
|
||||
define i32 @bar() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
; RUN: llc < %s -mtriple=i686-pc-linux-gnu | FileCheck %s
|
||||
|
||||
@__gthrw_pthread_once = weak alias i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
|
||||
@__gthrw_pthread_once = weak alias i32 (i32*, void ()*), i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
|
||||
|
||||
define weak i32 @pthread_once(i32*, void ()*) {
|
||||
ret i32 0
|
||||
|
@ -8,7 +8,7 @@ target triple = "i386-pc-linux-gnu"
|
||||
@__resp = thread_local global %struct.__res_state* @_res ; <%struct.__res_state**> [#uses=1]
|
||||
@_res = global %struct.__res_state zeroinitializer, section ".bss" ; <%struct.__res_state*> [#uses=1]
|
||||
|
||||
@__libc_resp = hidden thread_local alias %struct.__res_state** @__resp ; <%struct.__res_state**> [#uses=2]
|
||||
@__libc_resp = hidden thread_local alias %struct.__res_state*, %struct.__res_state** @__resp ; <%struct.__res_state**> [#uses=2]
|
||||
|
||||
define i32 @foo() {
|
||||
; CHECK-LABEL: foo:
|
||||
|
@ -6,7 +6,7 @@
|
||||
%struct.locale_data = type { i8*, i8*, i32, i32, { void (%struct.locale_data*)*, %struct.anon }, i32, i32, i32, [0 x %struct.locale_data_value] }
|
||||
%struct.locale_data_value = type { i32* }
|
||||
|
||||
@wcstoll_l = alias i64 (i32*, i32**, i32, %struct.__locale_struct*)* @__wcstoll_l
|
||||
@wcstoll_l = alias i64 (i32*, i32**, i32, %struct.__locale_struct*), i64 (i32*, i32**, i32, %struct.__locale_struct*)* @__wcstoll_l
|
||||
|
||||
define i64 @____wcstoll_l_internal(i32* %nptr, i32** %endptr, i32 %base, i32 %group, %struct.__locale_struct* %loc) nounwind {
|
||||
entry:
|
||||
|
@ -2,7 +2,7 @@
|
||||
; RUN: -relocation-model=pic | FileCheck %s
|
||||
|
||||
@thread_var = thread_local global i32 42, align 4
|
||||
@thread_alias = thread_local(localdynamic) alias i32* @thread_var
|
||||
@thread_alias = thread_local(localdynamic) alias i32, i32* @thread_var
|
||||
|
||||
; CHECK-LABEL: get_thread_var
|
||||
define i32* @get_thread_var() {
|
||||
@ -19,10 +19,10 @@ define i32* @get_thread_alias() {
|
||||
@bar = global i32 42
|
||||
|
||||
; CHECK-DAG: .globl foo1
|
||||
@foo1 = alias i32* @bar
|
||||
@foo1 = alias i32, i32* @bar
|
||||
|
||||
; CHECK-DAG: .globl foo2
|
||||
@foo2 = alias i32* @bar
|
||||
@foo2 = alias i32, i32* @bar
|
||||
|
||||
%FunTy = type i32()
|
||||
|
||||
@ -30,35 +30,35 @@ define i32 @foo_f() {
|
||||
ret i32 0
|
||||
}
|
||||
; CHECK-DAG: .weak bar_f
|
||||
@bar_f = weak alias %FunTy* @foo_f
|
||||
@bar_f = weak alias %FunTy, %FunTy* @foo_f
|
||||
|
||||
@bar_l = linkonce_odr alias i32* @bar
|
||||
@bar_l = linkonce_odr alias i32, i32* @bar
|
||||
; CHECK-DAG: .weak bar_l
|
||||
|
||||
@bar_i = internal alias i32* @bar
|
||||
@bar_i = internal alias i32, i32* @bar
|
||||
|
||||
; CHECK-DAG: .globl A
|
||||
@A = alias bitcast (i32* @bar to i64*)
|
||||
@A = alias i64, bitcast (i32* @bar to i64*)
|
||||
|
||||
; CHECK-DAG: .globl bar_h
|
||||
; CHECK-DAG: .hidden bar_h
|
||||
@bar_h = hidden alias i32* @bar
|
||||
@bar_h = hidden alias i32, i32* @bar
|
||||
|
||||
; CHECK-DAG: .globl bar_p
|
||||
; CHECK-DAG: .protected bar_p
|
||||
@bar_p = protected alias i32* @bar
|
||||
@bar_p = protected alias i32, i32* @bar
|
||||
|
||||
; CHECK-DAG: test2 = bar+4
|
||||
@test2 = alias getelementptr(i32, i32* @bar, i32 1)
|
||||
@test2 = alias i32, getelementptr(i32, i32* @bar, i32 1)
|
||||
|
||||
; CHECK-DAG: test3 = 42
|
||||
@test3 = alias inttoptr(i32 42 to i32*)
|
||||
@test3 = alias i32, inttoptr(i32 42 to i32*)
|
||||
|
||||
; CHECK-DAG: test4 = bar
|
||||
@test4 = alias inttoptr(i64 ptrtoint (i32* @bar to i64) to i32*)
|
||||
@test4 = alias i32, inttoptr(i64 ptrtoint (i32* @bar to i64) to i32*)
|
||||
|
||||
; CHECK-DAG: test5 = test2-bar
|
||||
@test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
|
||||
@test5 = alias i32, inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
|
||||
i32 ptrtoint (i32* @bar to i32)) to i32*)
|
||||
|
||||
; CHECK-DAG: .globl test
|
||||
|
0
test/CodeGen/X86/avx512-mask-bugfix.ll
Executable file → Normal file
0
test/CodeGen/X86/avx512-mask-bugfix.ll
Executable file → Normal file
@ -53,7 +53,7 @@ define x86_fastcallcc void @f8() comdat($f8) {
|
||||
$vftable = comdat largest
|
||||
|
||||
@some_name = private unnamed_addr constant [2 x i8*] zeroinitializer, comdat($vftable)
|
||||
@vftable = alias getelementptr([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
|
||||
@vftable = alias i8*, getelementptr([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
|
||||
|
||||
; CHECK: .section .text,"xr",discard,_f1
|
||||
; CHECK: .globl _f1
|
||||
|
@ -53,22 +53,22 @@ define weak_odr dllexport void @weak1() {
|
||||
|
||||
; CHECK: .globl alias
|
||||
; CHECK: alias = notExported
|
||||
@alias = dllexport alias void()* @notExported
|
||||
@alias = dllexport alias void(), void()* @notExported
|
||||
|
||||
; CHECK: .globl alias2
|
||||
; CHECK: alias2 = f1
|
||||
@alias2 = dllexport alias void()* @f1
|
||||
@alias2 = dllexport alias void(), void()* @f1
|
||||
|
||||
; CHECK: .globl alias3
|
||||
; CHECK: alias3 = notExported
|
||||
@alias3 = dllexport alias void()* @notExported
|
||||
@alias3 = dllexport alias void(), void()* @notExported
|
||||
|
||||
; CHECK: .weak weak_alias
|
||||
; CHECK: weak_alias = f1
|
||||
@weak_alias = weak_odr dllexport alias void()* @f1
|
||||
@weak_alias = weak_odr dllexport alias void(), void()* @f1
|
||||
|
||||
@blob = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16
|
||||
@blob_alias = dllexport alias bitcast ([6 x i8]* @blob to i32 ()*)
|
||||
@blob_alias = dllexport alias i32 (), bitcast ([6 x i8]* @blob to i32 ()*)
|
||||
|
||||
; CHECK: .section .drectve
|
||||
; WIN32: /EXPORT:f1
|
||||
|
@ -74,19 +74,19 @@ define weak_odr dllexport void @weak1() {
|
||||
|
||||
; CHECK: .globl _alias
|
||||
; CHECK: _alias = _notExported
|
||||
@alias = dllexport alias void()* @notExported
|
||||
@alias = dllexport alias void(), void()* @notExported
|
||||
|
||||
; CHECK: .globl _alias2
|
||||
; CHECK: _alias2 = _f1
|
||||
@alias2 = dllexport alias void()* @f1
|
||||
@alias2 = dllexport alias void(), void()* @f1
|
||||
|
||||
; CHECK: .globl _alias3
|
||||
; CHECK: _alias3 = _notExported
|
||||
@alias3 = dllexport alias void()* @notExported
|
||||
@alias3 = dllexport alias void(), void()* @notExported
|
||||
|
||||
; CHECK: .weak _weak_alias
|
||||
; CHECK: _weak_alias = _f1
|
||||
@weak_alias = weak_odr dllexport alias void()* @f1
|
||||
@weak_alias = weak_odr dllexport alias void(), void()* @f1
|
||||
|
||||
; CHECK: .section .drectve
|
||||
; CHECK-CL-NOT: not_exported
|
||||
|
@ -15,7 +15,7 @@ entry:
|
||||
; CHECK-NEXT: calll __emutls_get_address@PLT
|
||||
; CHECK-NEXT: movl (%eax), %eax
|
||||
|
||||
@alias = internal alias i32* @v
|
||||
@alias = internal alias i32, i32* @v
|
||||
define i32 @f_alias() nounwind {
|
||||
entry:
|
||||
%t = load i32, i32* @v
|
||||
|
@ -13,7 +13,7 @@ entry:
|
||||
; CHECK: leal v@TLSGD
|
||||
; CHECK: __tls_get_addr
|
||||
|
||||
@alias = internal alias i32* @v
|
||||
@alias = internal alias i32, i32* @v
|
||||
define i32 @f_alias() nounwind {
|
||||
entry:
|
||||
%t = load i32, i32* @v
|
||||
|
@ -20,4 +20,4 @@ define void @pselect() {
|
||||
@var = global i32 0
|
||||
|
||||
; CHECK: alias = var
|
||||
@alias = alias i32* @var
|
||||
@alias = alias i32, i32* @var
|
||||
|
0
test/CodeGen/X86/shift-avx2-crash.ll
Executable file → Normal file
0
test/CodeGen/X86/shift-avx2-crash.ll
Executable file → Normal file
@ -1,7 +1,7 @@
|
||||
; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
|
||||
; RUN: grep "callq g@PLT" %t1
|
||||
|
||||
@g = weak alias i32 ()* @f
|
||||
@g = weak alias i32 (), i32 ()* @f
|
||||
|
||||
define void @h() {
|
||||
entry:
|
||||
|
@ -5,9 +5,9 @@ define void @a_val() nounwind {
|
||||
@b_val = constant i32 42, section ".cp.rodata"
|
||||
@c_val = global i32 42
|
||||
|
||||
@a = alias void ()* @a_val
|
||||
@b = alias i32* @b_val
|
||||
@c = alias i32* @c_val
|
||||
@a = alias void (), void ()* @a_val
|
||||
@b = alias i32, i32* @b_val
|
||||
@c = alias i32, i32* @c_val
|
||||
|
||||
; CHECK-LABEL: a_addr:
|
||||
; CHECK: ldap r11, a
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
%class.D = type { i32, i32, i32, i32 }
|
||||
|
||||
@_ZN1DC1Ev = alias void (%class.D*)* @_ZN1DC2Ev
|
||||
@_ZN1DC1ERKS_ = alias void (%class.D*, %class.D*)* @_ZN1DC2ERKS_
|
||||
@_ZN1DC1Ev = alias void (%class.D*), void (%class.D*)* @_ZN1DC2Ev
|
||||
@_ZN1DC1ERKS_ = alias void (%class.D*, %class.D*), void (%class.D*, %class.D*)* @_ZN1DC2ERKS_
|
||||
|
||||
define void @_ZN1DC2Ev(%class.D* nocapture %this) unnamed_addr nounwind uwtable align 2 {
|
||||
entry:
|
||||
|
@ -9,8 +9,8 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
%class.anon = type { i8 }
|
||||
%class.anon.0 = type { i8 }
|
||||
|
||||
@"_ZN8functionIFvvEEC1IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_" = internal alias void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_"
|
||||
@"_ZN8functionIFvvEEC1IZN17BPLFunctionWriter9writeExprEvE3$_0EET_" = internal alias void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_"
|
||||
@"_ZN8functionIFvvEEC1IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_" = internal alias void (%class.function*), void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_"
|
||||
@"_ZN8functionIFvvEEC1IZN17BPLFunctionWriter9writeExprEvE3$_0EET_" = internal alias void (%class.function*), void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_"
|
||||
|
||||
define void @_ZN17BPLFunctionWriter9writeExprEv(%class.BPLFunctionWriter* %this) nounwind uwtable align 2 {
|
||||
entry:
|
||||
|
@ -14,8 +14,8 @@
|
||||
@_ZTS1A = linkonce_odr constant [3 x i8] c"1A\00"
|
||||
@_ZTI1A = linkonce_odr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }
|
||||
|
||||
@_ZN1AC1Ei = alias void (%class.A*, i32)* @_ZN1AC2Ei
|
||||
@_ZN1AC1ERKS_ = alias void (%class.A*, %class.A*)* @_ZN1AC2ERKS_
|
||||
@_ZN1AC1Ei = alias void (%class.A*, i32), void (%class.A*, i32)* @_ZN1AC2Ei
|
||||
@_ZN1AC1ERKS_ = alias void (%class.A*, %class.A*), void (%class.A*, %class.A*)* @_ZN1AC2ERKS_
|
||||
|
||||
; Function Attrs: nounwind uwtable
|
||||
define void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 {
|
||||
|
@ -9,20 +9,20 @@
|
||||
@v3 = global [2 x i16] zeroinitializer
|
||||
; CHECK: @v3 = global [2 x i16] zeroinitializer
|
||||
|
||||
@a1 = alias bitcast (i32* @v1 to i16*)
|
||||
; CHECK: @a1 = alias bitcast (i32* @v1 to i16*)
|
||||
@a1 = alias i16, bitcast (i32* @v1 to i16*)
|
||||
; CHECK: @a1 = alias i16, bitcast (i32* @v1 to i16*)
|
||||
|
||||
@a2 = alias bitcast([1 x i32]* @v2 to i32*)
|
||||
; CHECK: @a2 = alias getelementptr inbounds ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
|
||||
@a2 = alias i32, bitcast([1 x i32]* @v2 to i32*)
|
||||
; CHECK: @a2 = alias i32, getelementptr inbounds ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
|
||||
|
||||
@a3 = alias addrspacecast (i32* @v1 to i32 addrspace(2)*)
|
||||
; CHECK: @a3 = alias addrspacecast (i32* @v1 to i32 addrspace(2)*)
|
||||
@a3 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*)
|
||||
; CHECK: @a3 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*)
|
||||
|
||||
@a4 = alias bitcast (i32* @v1 to i16*)
|
||||
; CHECK: @a4 = alias bitcast (i32* @v1 to i16*)
|
||||
@a4 = alias i16, bitcast (i32* @v1 to i16*)
|
||||
; CHECK: @a4 = alias i16, bitcast (i32* @v1 to i16*)
|
||||
|
||||
@a5 = thread_local(localdynamic) alias i32* @v1
|
||||
; CHECK: @a5 = thread_local(localdynamic) alias i32* @v1
|
||||
@a5 = thread_local(localdynamic) alias i32, i32* @v1
|
||||
; CHECK: @a5 = thread_local(localdynamic) alias i32, i32* @v1
|
||||
|
||||
@a6 = alias getelementptr ([2 x i16], [2 x i16]* @v3, i32 1, i32 1)
|
||||
; CHECK: @a6 = alias getelementptr ([2 x i16], [2 x i16]* @v3, i32 1, i32 1)
|
||||
@a6 = alias i16, getelementptr ([2 x i16], [2 x i16]* @v3, i32 1, i32 1)
|
||||
; CHECK: @a6 = alias i16, getelementptr ([2 x i16], [2 x i16]* @v3, i32 1, i32 1)
|
||||
|
@ -5,28 +5,28 @@
|
||||
@llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @foo1 to i8*)], section "llvm.metadata"
|
||||
|
||||
@bar = global i32 0
|
||||
@foo1 = alias i32* @bar
|
||||
@foo2 = alias i32* @bar
|
||||
@foo3 = alias i32* @foo2
|
||||
@foo4 = unnamed_addr alias i32* @foo2
|
||||
@foo1 = alias i32, i32* @bar
|
||||
@foo2 = alias i32, i32* @bar
|
||||
@foo3 = alias i32, i32* @foo2
|
||||
@foo4 = unnamed_addr alias i32, i32* @foo2
|
||||
|
||||
; Make sure the verifier does not complain about references to a global
|
||||
; declaration from an initializer.
|
||||
@decl = external global i32
|
||||
@ptr = global i32* @decl
|
||||
@ptr_a = alias i32** @ptr
|
||||
@ptr_a = alias i32*, i32** @ptr
|
||||
|
||||
%FunTy = type i32()
|
||||
|
||||
define i32 @foo_f() {
|
||||
ret i32 0
|
||||
}
|
||||
@bar_f = weak_odr alias %FunTy* @foo_f
|
||||
@bar_ff = alias i32()* @bar_f
|
||||
@bar_f = weak_odr alias %FunTy, %FunTy* @foo_f
|
||||
@bar_ff = alias i32(), i32()* @bar_f
|
||||
|
||||
@bar_i = internal alias i32* @bar
|
||||
@bar_i = internal alias i32, i32* @bar
|
||||
|
||||
@A = alias bitcast (i32* @bar to i64*)
|
||||
@A = alias i64, bitcast (i32* @bar to i64*)
|
||||
|
||||
define i32 @test() {
|
||||
entry:
|
||||
|
@ -9,8 +9,8 @@ $f2 = comdat any
|
||||
@v = global i32 0, comdat($f)
|
||||
; CHECK: @v = global i32 0, comdat($f)
|
||||
|
||||
@a = alias i32* @v
|
||||
; CHECK: @a = alias i32* @v{{$}}
|
||||
@a = alias i32, i32* @v
|
||||
; CHECK: @a = alias i32, i32* @v{{$}}
|
||||
|
||||
define void @f() comdat($f) {
|
||||
ret void
|
||||
|
@ -6,9 +6,9 @@ target triple = "i686-pc-windows-msvc"
|
||||
; no action should be taken for these globals
|
||||
$global_noinst = comdat largest
|
||||
@aliasee = private unnamed_addr constant [2 x i8] [i8 1, i8 2], comdat($global_noinst)
|
||||
@global_noinst = unnamed_addr alias [2 x i8]* @aliasee
|
||||
@global_noinst = unnamed_addr alias [2 x i8], [2 x i8]* @aliasee
|
||||
; CHECK-NOT: {{asan_gen.*global_noinst}}
|
||||
; CHECK-DAG: @global_noinst = unnamed_addr alias [2 x i8]* @aliasee
|
||||
; CHECK-DAG: @global_noinst = unnamed_addr alias [2 x i8], [2 x i8]* @aliasee
|
||||
@global_inst = private constant [2 x i8] [i8 1, i8 2]
|
||||
; CHECK-DAG: {{asan_gen.*global_inst}}
|
||||
; CHECK: @asan.module_ctor
|
||||
|
@ -17,7 +17,7 @@ define i32 @functional(i32 %a, i32 %b) {
|
||||
; CHECK: %[[CALL:.*]] = call { i32 (i32, i32)*, i16 } @"dfs$g"(i32 %0, i16 0)
|
||||
; CHECK: %[[XVAL:.*]] = extractvalue { i32 (i32, i32)*, i16 } %[[CALL]], 0
|
||||
; CHECK: ret {{.*}} %[[XVAL]]
|
||||
@discardg = alias i32 (i32, i32)* (i32)* @g
|
||||
@discardg = alias i32 (i32, i32)* (i32), i32 (i32, i32)* (i32)* @g
|
||||
|
||||
declare void @custom1(i32 %a, i32 %b)
|
||||
|
||||
@ -83,7 +83,7 @@ define i32 (i32, i32)* @g(i32) {
|
||||
; CHECK: %[[IVAL0:.*]] = insertvalue { i32, i16 } undef, i32 %[[CALL]], 0
|
||||
; CHECK: %[[IVAL1:.*]] = insertvalue { i32, i16 } %[[IVAL0]], i16 0, 1
|
||||
; CHECK: ret { i32, i16 } %[[IVAL1]]
|
||||
@adiscard = alias i32 (i32, i32)* @discard
|
||||
@adiscard = alias i32 (i32, i32), i32 (i32, i32)* @discard
|
||||
|
||||
; CHECK: declare void @__dfsw_custom1(i32, i32, i16, i16)
|
||||
; CHECK: declare i32 @__dfsw_custom2(i32, i32, i16, i16, i16*)
|
||||
|
@ -7,10 +7,10 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
module asm ".symver f1,f@@version1"
|
||||
|
||||
; CHECK: @"dfs$f2" = alias {{.*}} @"dfs$f1"
|
||||
@f2 = alias void ()* @f1
|
||||
@f2 = alias void (), void ()* @f1
|
||||
|
||||
; CHECK: @"dfs$g2" = alias {{.*}} @"dfs$g1"
|
||||
@g2 = alias bitcast (void (i8*)* @g1 to void (i16*)*)
|
||||
@g2 = alias void (i16*), bitcast (void (i8*)* @g1 to void (i16*)*)
|
||||
|
||||
; CHECK: define void @"dfs$f1"
|
||||
define void @f1() {
|
||||
|
@ -8,7 +8,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
@foo = weak global i32 0 ; <i32*> [#uses=1]
|
||||
|
||||
@bar = weak alias i32* @foo ; <i32*> [#uses=1]
|
||||
@bar = weak alias i32, i32* @foo ; <i32*> [#uses=1]
|
||||
|
||||
define i32 @baz() nounwind {
|
||||
entry:
|
||||
|
@ -3,7 +3,7 @@
|
||||
; RUN: llvm-as %p/2008-07-06-AliasFnDecl2.ll -o %t2.bc
|
||||
; RUN: llvm-link %t1.bc %t2.bc -o %t3.bc
|
||||
|
||||
@b = alias void ()* @a
|
||||
@b = alias void (), void ()* @a
|
||||
|
||||
define void @a() nounwind {
|
||||
entry:
|
||||
|
@ -7,9 +7,9 @@
|
||||
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
|
||||
target triple = "i386-pc-linux-gnu"
|
||||
|
||||
@sched_clock = alias i64 ()* @native_sched_clock
|
||||
@sched_clock = alias i64 (), i64 ()* @native_sched_clock
|
||||
|
||||
@foo = alias i32* @realfoo
|
||||
@foo = alias i32, i32* @realfoo
|
||||
@realfoo = global i32 0
|
||||
|
||||
define i64 @native_sched_clock() nounwind {
|
||||
|
@ -1,7 +1,7 @@
|
||||
%foo = type { [8 x i8] }
|
||||
%bar = type { [9 x i8] }
|
||||
|
||||
@zed = alias bitcast (void (%bar*)* @xyz to void (%foo*)*)
|
||||
@zed = alias void (%foo*), bitcast (void (%bar*)* @xyz to void (%foo*)*)
|
||||
|
||||
define void @xyz(%bar* %this) {
|
||||
entry:
|
||||
|
@ -1,3 +1,3 @@
|
||||
@zed = global i32 42
|
||||
@foo = alias i32* @zed
|
||||
@foo2 = alias bitcast (i32* @zed to i16*)
|
||||
@foo = alias i32, i32* @zed
|
||||
@foo2 = alias i16, bitcast (i32* @zed to i16*)
|
||||
|
@ -4,6 +4,6 @@ $foo = comdat largest
|
||||
|
||||
@zed = external constant i8
|
||||
@some_name = private unnamed_addr constant [2 x i8*] [i8* @zed, i8* bitcast (void ()* @bar to i8*)], comdat($foo)
|
||||
@foo = alias getelementptr([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
|
||||
@foo = alias i8*, getelementptr([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
|
||||
|
||||
declare void @bar() unnamed_addr
|
||||
|
@ -1,4 +1,4 @@
|
||||
$c1 = comdat largest
|
||||
|
||||
@some_name = private unnamed_addr constant i32 42, comdat($c1)
|
||||
@c1 = alias i32* @some_name
|
||||
@c1 = alias i32, i32* @some_name
|
||||
|
@ -1,4 +1,4 @@
|
||||
%u = type { i8 }
|
||||
|
||||
@g2 = global %u zeroinitializer
|
||||
@a = weak alias %u* @g2
|
||||
@a = weak alias %u, %u* @g2
|
||||
|
@ -7,9 +7,9 @@ $c1 = comdat any
|
||||
@v4 = hidden global i32 1, comdat($c1)
|
||||
|
||||
; Aliases
|
||||
@a1 = weak hidden alias i32* @v1
|
||||
@a2 = weak protected alias i32* @v2
|
||||
@a3 = weak hidden alias i32* @v3
|
||||
@a1 = weak hidden alias i32, i32* @v1
|
||||
@a2 = weak protected alias i32, i32* @v2
|
||||
@a3 = weak hidden alias i32, i32* @v3
|
||||
|
||||
; Functions
|
||||
define weak hidden void @f1() {
|
||||
|
@ -2,15 +2,15 @@
|
||||
; RUN: llvm-link %S/Inputs/alias.ll %s -S -o - | FileCheck %s
|
||||
|
||||
@foo = weak global i32 0
|
||||
; CHECK-DAG: @foo = alias i32* @zed
|
||||
; CHECK-DAG: @foo = alias i32, i32* @zed
|
||||
|
||||
@bar = alias i32* @foo
|
||||
; CHECK-DAG: @bar = alias i32* @foo
|
||||
@bar = alias i32, i32* @foo
|
||||
; CHECK-DAG: @bar = alias i32, i32* @foo
|
||||
|
||||
@foo2 = weak global i32 0
|
||||
; CHECK-DAG: @foo2 = alias bitcast (i32* @zed to i16*)
|
||||
; CHECK-DAG: @foo2 = alias i16, bitcast (i32* @zed to i16*)
|
||||
|
||||
@bar2 = alias i32* @foo2
|
||||
; CHECK-DAG: @bar2 = alias bitcast (i16* @foo2 to i32*)
|
||||
@bar2 = alias i32, i32* @foo2
|
||||
; CHECK-DAG: @bar2 = alias i32, bitcast (i16* @foo2 to i32*)
|
||||
|
||||
; CHECK-DAG: @zed = global i32 42
|
||||
|
@ -5,6 +5,6 @@ target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
|
||||
$foo = comdat largest
|
||||
@foo = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast (void ()* @bar to i8*)], comdat($foo)
|
||||
|
||||
; CHECK: @foo = alias getelementptr inbounds ([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
|
||||
; CHECK: @foo = alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
|
||||
|
||||
declare void @bar() unnamed_addr
|
||||
|
@ -3,6 +3,6 @@
|
||||
$c1 = comdat largest
|
||||
|
||||
@some_name = private unnamed_addr constant i32 42, comdat($c1)
|
||||
@c1 = alias i8* inttoptr (i32 ptrtoint (i32* @some_name to i32) to i8*)
|
||||
@c1 = alias i8, inttoptr (i32 ptrtoint (i32* @some_name to i32) to i8*)
|
||||
|
||||
; CHECK: COMDAT key involves incomputable alias size.
|
||||
|
@ -1,13 +1,13 @@
|
||||
; RUN: llvm-link %s -S -o - | FileCheck %s
|
||||
|
||||
$c = comdat any
|
||||
@a = alias void ()* @f
|
||||
@a = alias void (), void ()* @f
|
||||
define internal void @f() comdat($c) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-DAG: $c = comdat any
|
||||
; CHECK-DAG: @a = alias void ()* @f
|
||||
; CHECK-DAG: @a = alias void (), void ()* @f
|
||||
; CHECK-DAG: define internal void @f() comdat($c)
|
||||
|
||||
$f2 = comdat largest
|
||||
|
@ -4,8 +4,8 @@
|
||||
$_ZN3fooIiEC5Ev = comdat any
|
||||
; CHECK: $_ZN3fooIiEC5Ev = comdat any
|
||||
|
||||
@_ZN3fooIiEC1Ev = weak_odr alias void ()* @_ZN3fooIiEC2Ev
|
||||
; CHECK: @_ZN3fooIiEC1Ev = weak_odr alias void ()* @_ZN3fooIiEC2Ev
|
||||
@_ZN3fooIiEC1Ev = weak_odr alias void (), void ()* @_ZN3fooIiEC2Ev
|
||||
; CHECK: @_ZN3fooIiEC1Ev = weak_odr alias void (), void ()* @_ZN3fooIiEC2Ev
|
||||
|
||||
; CHECK: define weak_odr void @_ZN3fooIiEC2Ev() comdat($_ZN3fooIiEC5Ev) {
|
||||
define weak_odr void @_ZN3fooIiEC2Ev() comdat($_ZN3fooIiEC5Ev) {
|
||||
|
@ -6,10 +6,10 @@
|
||||
@g2 = linkonce_odr global i8 0
|
||||
; CHECK-NOT: @g2
|
||||
|
||||
@a1 = private alias i8* @g1
|
||||
@a1 = private alias i8, i8* @g1
|
||||
; CHECK-NOT: @a1
|
||||
|
||||
@a2 = linkonce_odr alias i8* @g2
|
||||
@a2 = linkonce_odr alias i8, i8* @g2
|
||||
; CHECK-NOT: @a2
|
||||
|
||||
define private void @f1() {
|
||||
|
@ -3,8 +3,8 @@
|
||||
%t = type { i8 }
|
||||
|
||||
@g = global %t zeroinitializer
|
||||
@a = weak alias %t* @g
|
||||
@a = weak alias %t, %t* @g
|
||||
|
||||
; CHECK: @g = global %t zeroinitializer
|
||||
; CHECK: @g2 = global %t zeroinitializer
|
||||
; CHECK: @a = weak alias %t* @g
|
||||
; CHECK: @a = weak alias %t, %t* @g
|
||||
|
@ -22,9 +22,9 @@ define weak void @func-b() unnamed_addr { ret void }
|
||||
; CHECK-DAG: @global-f = global i32 42
|
||||
|
||||
@alias-a = weak global i32 42
|
||||
; CHECK-DAG: @alias-a = alias i32* @global-f
|
||||
; CHECK-DAG: @alias-a = alias i32, i32* @global-f
|
||||
@alias-b = weak unnamed_addr global i32 42
|
||||
; CHECK-DAG: @alias-b = unnamed_addr alias i32* @global-f
|
||||
; CHECK-DAG: @alias-b = unnamed_addr alias i32, i32* @global-f
|
||||
|
||||
declare void @func-c()
|
||||
; CHECK-DAG: define weak void @func-c() {
|
||||
@ -44,9 +44,9 @@ define weak void @func-e() unnamed_addr { ret void }
|
||||
; CHECK-DAG: @global-j = global i32 42
|
||||
|
||||
@alias-c = weak global i32 42
|
||||
; CHECK-DAG: @alias-c = alias i32* @global-f
|
||||
; CHECK-DAG: @alias-c = alias i32, i32* @global-f
|
||||
@alias-d = weak unnamed_addr global i32 42
|
||||
; CHECK-DAG: @alias-d = alias i32* @global-f
|
||||
; CHECK-DAG: @alias-d = alias i32, i32* @global-f
|
||||
|
||||
|
||||
declare void @func-g()
|
||||
|
@ -6,8 +6,8 @@
|
||||
@global-e = unnamed_addr global i32 42
|
||||
@global-f = unnamed_addr global i32 42
|
||||
|
||||
@alias-a = unnamed_addr alias i32* @global-f
|
||||
@alias-b = unnamed_addr alias i32* @global-f
|
||||
@alias-a = unnamed_addr alias i32, i32* @global-f
|
||||
@alias-b = unnamed_addr alias i32, i32* @global-f
|
||||
|
||||
define weak void @func-c() unnamed_addr { ret void }
|
||||
define weak void @func-d() unnamed_addr { ret void }
|
||||
@ -18,8 +18,8 @@ define weak void @func-e() unnamed_addr { ret void }
|
||||
@global-i = global i32 42
|
||||
@global-j = global i32 42
|
||||
|
||||
@alias-c = alias i32* @global-f
|
||||
@alias-d = alias i32* @global-f
|
||||
@alias-c = alias i32, i32* @global-f
|
||||
@alias-d = alias i32, i32* @global-f
|
||||
|
||||
define weak void @func-g() { ret void }
|
||||
define weak void @func-h() { ret void }
|
||||
|
@ -21,14 +21,14 @@ $c1 = comdat any
|
||||
@v4 = global i32 1, comdat($c1)
|
||||
|
||||
; Aliases
|
||||
; CHECK: @a1 = hidden alias i32* @v1
|
||||
@a1 = alias i32* @v1
|
||||
; CHECK: @a1 = hidden alias i32, i32* @v1
|
||||
@a1 = alias i32, i32* @v1
|
||||
|
||||
; CHECK: @a2 = protected alias i32* @v2
|
||||
@a2 = alias i32* @v2
|
||||
; CHECK: @a2 = protected alias i32, i32* @v2
|
||||
@a2 = alias i32, i32* @v2
|
||||
|
||||
; CHECK: @a3 = hidden alias i32* @v3
|
||||
@a3 = protected alias i32* @v3
|
||||
; CHECK: @a3 = hidden alias i32, i32* @v3
|
||||
@a3 = protected alias i32, i32* @v3
|
||||
|
||||
|
||||
; Functions
|
||||
|
@ -27,8 +27,8 @@ module asm ".long undef_asm_sym"
|
||||
@g3 = common global i32 0
|
||||
@g4 = private global i32 42
|
||||
|
||||
@a1 = alias i32* @g1
|
||||
@a2 = internal alias i32* @g1
|
||||
@a1 = alias i32, i32* @g1
|
||||
@a2 = internal alias i32, i32* @g1
|
||||
|
||||
define void @f1() {
|
||||
ret void
|
||||
|
@ -12,10 +12,10 @@
|
||||
; CHECK: declare void @a0bar()
|
||||
|
||||
; DELETE: @zed = global i32 0
|
||||
; DELETE: @zeda0 = alias i32* @zed
|
||||
; DELETE-NEXT: @a0foo = alias i32* ()* @foo
|
||||
; DELETE-NEXT: @a0a0bar = alias void ()* @bar
|
||||
; DELETE-NEXT: @a0bar = alias void ()* @bar
|
||||
; DELETE: @zeda0 = alias i32, i32* @zed
|
||||
; DELETE-NEXT: @a0foo = alias i32* (), i32* ()* @foo
|
||||
; DELETE-NEXT: @a0a0bar = alias void (), void ()* @bar
|
||||
; DELETE-NEXT: @a0bar = alias void (), void ()* @bar
|
||||
; DELETE: declare i32* @foo()
|
||||
; DELETE: define void @bar() {
|
||||
; DELETE-NEXT: %c = call i32* @foo()
|
||||
@ -23,25 +23,25 @@
|
||||
; DELETE-NEXT: }
|
||||
|
||||
; ALIAS: @zed = external global i32
|
||||
; ALIAS: @zeda0 = alias i32* @zed
|
||||
; ALIAS: @zeda0 = alias i32, i32* @zed
|
||||
|
||||
; ALIASRE: @a0a0bar = alias void ()* @bar
|
||||
; ALIASRE: @a0bar = alias void ()* @bar
|
||||
; ALIASRE: @a0a0bar = alias void (), void ()* @bar
|
||||
; ALIASRE: @a0bar = alias void (), void ()* @bar
|
||||
; ALIASRE: declare void @bar()
|
||||
|
||||
@zed = global i32 0
|
||||
@zeda0 = alias i32* @zed
|
||||
@zeda0 = alias i32, i32* @zed
|
||||
|
||||
@a0foo = alias i32* ()* @foo
|
||||
@a0foo = alias i32* (), i32* ()* @foo
|
||||
|
||||
define i32* @foo() {
|
||||
call void @a0bar()
|
||||
ret i32* @zeda0
|
||||
}
|
||||
|
||||
@a0a0bar = alias void ()* @bar
|
||||
@a0a0bar = alias void (), void ()* @bar
|
||||
|
||||
@a0bar = alias void ()* @bar
|
||||
@a0bar = alias void (), void ()* @bar
|
||||
|
||||
define void @bar() {
|
||||
%c = call i32* @foo()
|
||||
|
@ -12,13 +12,13 @@
|
||||
; WITH: T bar
|
||||
; WITH: T foo
|
||||
|
||||
@a0foo = alias void ()* @foo
|
||||
@a0foo = alias void (), void ()* @foo
|
||||
|
||||
define void @foo() {
|
||||
ret void
|
||||
}
|
||||
|
||||
@a0bar = alias void ()* @bar
|
||||
@a0bar = alias void (), void ()* @bar
|
||||
|
||||
define void @bar() {
|
||||
ret void
|
||||
|
@ -20,7 +20,7 @@ define i32 @caller() {
|
||||
}
|
||||
|
||||
%struct.S = type { i8 }
|
||||
@_ZN1SC1Ev = alias void (%struct.S*)* @_ZN1SC2Ev
|
||||
@_ZN1SC1Ev = alias void (%struct.S*), void (%struct.S*)* @_ZN1SC2Ev
|
||||
define void @_ZN1SC2Ev(%struct.S* %this) unnamed_addr align 2 {
|
||||
entry:
|
||||
%this.addr = alloca %struct.S*, align 4
|
||||
|
@ -25,7 +25,7 @@ declare void @helper([16 x i8]*)
|
||||
; CHECK-NEXT: @var7 = internal constant [16 x i8] c"foo1bar2foo3bar\00"
|
||||
; CHECK-NEXT: @var8 = private constant [16 x i8] c"foo1bar2foo3bar\00", align 16
|
||||
|
||||
@var4a = alias %struct.foobar* @var4
|
||||
@var4a = alias %struct.foobar, %struct.foobar* @var4
|
||||
@llvm.used = appending global [1 x %struct.foobar*] [%struct.foobar* @var4a], section "llvm.metadata"
|
||||
|
||||
define i32 @main() {
|
||||
|
@ -17,20 +17,20 @@ target triple = "i386-pc-linux-gnu"
|
||||
%"struct.std::pair<std::_Rb_tree_iterator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,bool>" = type { %"struct.std::_Rb_tree_iterator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >", i8 }
|
||||
%"struct.std::pair<void* const,void*>" = type { i8*, i8* }
|
||||
|
||||
@_ZL20__gthrw_pthread_oncePiPFvvE = weak alias i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_getspecificj = weak alias i8* (i32)* @pthread_getspecific ; <i8* (i32)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_setspecificjPKv = weak alias i32 (i32, i8*)* @pthread_setspecific ; <i32 (i32, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_createPmPK16__pthread_attr_sPFPvS3_ES3_ = weak alias i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; <i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_cancelm = weak alias i32 (i32)* @pthread_cancel ; <i32 (i32)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = weak alias i32 (%struct.pthread_mutex_t*, %struct.__sched_param*)* @pthread_mutex_init ; <i32 (%struct.pthread_mutex_t*, %struct.__sched_param*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_createPjPFvPvE = weak alias i32 (i32*, void (i8*)*)* @pthread_key_create ; <i32 (i32*, void (i8*)*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_deletej = weak alias i32 (i32)* @pthread_key_delete ; <i32 (i32)*> [#uses=0]
|
||||
@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = weak alias i32 (%struct.__sched_param*)* @pthread_mutexattr_init ; <i32 (%struct.__sched_param*)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = weak alias i32 (%struct.__sched_param*, i32)* @pthread_mutexattr_settype ; <i32 (%struct.__sched_param*, i32)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = weak alias i32 (%struct.__sched_param*)* @pthread_mutexattr_destroy ; <i32 (%struct.__sched_param*)*> [#uses=0]
|
||||
@_ZL20__gthrw_pthread_oncePiPFvvE = weak alias i32 (i32*, void ()*), i32 (i32*, void ()*)* @pthread_once ; <i32 (i32*, void ()*)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_getspecificj = weak alias i8* (i32), i8* (i32)* @pthread_getspecific ; <i8* (i32)*> [#uses=0]
|
||||
@_ZL27__gthrw_pthread_setspecificjPKv = weak alias i32 (i32, i8*), i32 (i32, i8*)* @pthread_setspecific ; <i32 (i32, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_createPmPK16__pthread_attr_sPFPvS3_ES3_ = weak alias i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*), i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; <i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)*> [#uses=0]
|
||||
@_ZL22__gthrw_pthread_cancelm = weak alias i32 (i32), i32 (i32)* @pthread_cancel ; <i32 (i32)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = weak alias i32 (%struct.pthread_mutex_t*, %struct.__sched_param*), i32 (%struct.pthread_mutex_t*, %struct.__sched_param*)* @pthread_mutex_init ; <i32 (%struct.pthread_mutex_t*, %struct.__sched_param*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_createPjPFvPvE = weak alias i32 (i32*, void (i8*)*), i32 (i32*, void (i8*)*)* @pthread_key_create ; <i32 (i32*, void (i8*)*)*> [#uses=0]
|
||||
@_ZL26__gthrw_pthread_key_deletej = weak alias i32 (i32), i32 (i32)* @pthread_key_delete ; <i32 (i32)*> [#uses=0]
|
||||
@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = weak alias i32 (%struct.__sched_param*), i32 (%struct.__sched_param*)* @pthread_mutexattr_init ; <i32 (%struct.__sched_param*)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = weak alias i32 (%struct.__sched_param*, i32), i32 (%struct.__sched_param*, i32)* @pthread_mutexattr_settype ; <i32 (%struct.__sched_param*, i32)*> [#uses=0]
|
||||
@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = weak alias i32 (%struct.__sched_param*), i32 (%struct.__sched_param*)* @pthread_mutexattr_destroy ; <i32 (%struct.__sched_param*)*> [#uses=0]
|
||||
|
||||
declare fastcc void @_ZNSt10_Select1stISt4pairIKPvS1_EEC1Ev() nounwind readnone
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
@A = global i32 0
|
||||
; CHECK: @A = global i32 0
|
||||
|
||||
@D = internal alias i32* @A
|
||||
@D = internal alias i32, i32* @A
|
||||
; DEAD-NOT: @D
|
||||
|
||||
@L1 = alias i32* @A
|
||||
; CHECK: @L1 = alias i32* @A
|
||||
@L1 = alias i32, i32* @A
|
||||
; CHECK: @L1 = alias i32, i32* @A
|
||||
|
||||
@L2 = internal alias i32* @L1
|
||||
; CHECK: @L2 = internal alias i32* @L1
|
||||
@L2 = internal alias i32, i32* @L1
|
||||
; CHECK: @L2 = internal alias i32, i32* @L1
|
||||
|
||||
@L3 = alias i32* @L2
|
||||
; CHECK: @L3 = alias i32* @L2
|
||||
@L3 = alias i32, i32* @L2
|
||||
; CHECK: @L3 = alias i32, i32* @L2
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -globaldce
|
||||
|
||||
@A = internal alias void ()* @F
|
||||
@A = internal alias void (), void ()* @F
|
||||
define internal void @F() { ret void }
|
||||
|
@ -3,8 +3,8 @@
|
||||
$c1 = comdat any
|
||||
; CHECK: $c1 = comdat any
|
||||
|
||||
@a1 = linkonce_odr alias void ()* @f1
|
||||
; CHECK: @a1 = linkonce_odr alias void ()* @f1
|
||||
@a1 = linkonce_odr alias void (), void ()* @f1
|
||||
; CHECK: @a1 = linkonce_odr alias void (), void ()* @f1
|
||||
|
||||
define linkonce_odr void @f1() comdat($c1) {
|
||||
ret void
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
@g = global i32 0
|
||||
|
||||
@a = alias bitcast (i32* @g to i8*)
|
||||
@a = alias i8, bitcast (i32* @g to i8*)
|
||||
|
||||
define void @f() {
|
||||
%tmp = load i8, i8* @a
|
||||
|
@ -6,14 +6,14 @@ define internal void @f() {
|
||||
ret void
|
||||
}
|
||||
|
||||
@a = alias void ()* @f
|
||||
@a = alias void (), void ()* @f
|
||||
|
||||
define void @g() {
|
||||
call void() @a()
|
||||
ret void
|
||||
}
|
||||
|
||||
@b = internal alias void ()* @g
|
||||
@b = internal alias void (), void ()* @g
|
||||
; CHECK-NOT: @b
|
||||
|
||||
define void @h() {
|
||||
|
@ -1,20 +1,20 @@
|
||||
; RUN: opt < %s -globalopt -S | FileCheck %s
|
||||
|
||||
@foo1 = alias void ()* @foo2
|
||||
; CHECK: @foo1 = alias void ()* @bar2
|
||||
@foo1 = alias void (), void ()* @foo2
|
||||
; CHECK: @foo1 = alias void (), void ()* @bar2
|
||||
|
||||
@foo2 = alias void()* @bar1
|
||||
; CHECK: @foo2 = alias void ()* @bar2
|
||||
@foo2 = alias void(), void()* @bar1
|
||||
; CHECK: @foo2 = alias void (), void ()* @bar2
|
||||
|
||||
@bar1 = alias void ()* @bar2
|
||||
; CHECK: @bar1 = alias void ()* @bar2
|
||||
@bar1 = alias void (), void ()* @bar2
|
||||
; CHECK: @bar1 = alias void (), void ()* @bar2
|
||||
|
||||
@weak1 = weak alias void ()* @bar2
|
||||
; CHECK: @weak1 = weak alias void ()* @bar2
|
||||
@weak1 = weak alias void (), void ()* @bar2
|
||||
; CHECK: @weak1 = weak alias void (), void ()* @bar2
|
||||
|
||||
@bar4 = private unnamed_addr constant [2 x i8*] zeroinitializer
|
||||
@foo4 = linkonce_odr unnamed_addr alias getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
|
||||
; CHECK: @foo4 = linkonce_odr unnamed_addr alias getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
|
||||
@foo4 = linkonce_odr unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
|
||||
; CHECK: @foo4 = linkonce_odr unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
|
||||
|
||||
define void @bar2() {
|
||||
ret void
|
||||
@ -37,7 +37,7 @@ entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
@foo3 = alias void ()* @bar3
|
||||
@foo3 = alias void (), void ()* @bar3
|
||||
; CHECK-NOT: bar3
|
||||
|
||||
define internal void @bar3() {
|
||||
|
@ -7,7 +7,7 @@ target datalayout = "p:32:32:32-p1:16:16:16"
|
||||
@i = internal addrspace(1) global i8 42
|
||||
|
||||
; CHECK: @ia = internal addrspace(1) global i8 42
|
||||
@ia = internal alias i8 addrspace(1)* @i
|
||||
@ia = internal alias i8, i8 addrspace(1)* @i
|
||||
|
||||
@llvm.used = appending global [1 x i8*] [i8* addrspacecast (i8 addrspace(1)* @ca to i8*)], section "llvm.metadata"
|
||||
; CHECK-DAG: @llvm.used = appending global [1 x i8*] [i8* addrspacecast (i8 addrspace(1)* @ca to i8*)], section "llvm.metadata"
|
||||
@ -18,8 +18,8 @@ target datalayout = "p:32:32:32-p1:16:16:16"
|
||||
@sameAsUsed = global [1 x i8*] [i8* addrspacecast(i8 addrspace(1)* @ca to i8*)]
|
||||
; CHECK-DAG: @sameAsUsed = global [1 x i8*] [i8* addrspacecast (i8 addrspace(1)* @c to i8*)]
|
||||
|
||||
@ca = internal alias i8 addrspace(1)* @c
|
||||
; CHECK: @ca = internal alias i8 addrspace(1)* @c
|
||||
@ca = internal alias i8, i8 addrspace(1)* @c
|
||||
; CHECK: @ca = internal alias i8, i8 addrspace(1)* @c
|
||||
|
||||
define i8 addrspace(1)* @h() {
|
||||
ret i8 addrspace(1)* @ca
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: opt -S -globalopt < %s | FileCheck %s
|
||||
|
||||
@_Z17in_custom_section = internal global i8 42, section "CUSTOM"
|
||||
@in_custom_section = internal dllexport alias i8* @_Z17in_custom_section
|
||||
@in_custom_section = internal dllexport alias i8, i8* @_Z17in_custom_section
|
||||
|
||||
; CHECK: @in_custom_section = internal dllexport global i8 42, section "CUSTOM"
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
@i = internal global i8 42
|
||||
; CHECK: @ia = internal global i8 42
|
||||
@ia = internal alias i8* @i
|
||||
@ia = internal alias i8, i8* @i
|
||||
|
||||
@llvm.used = appending global [3 x i8*] [i8* bitcast (void ()* @fa to i8*), i8* bitcast (void ()* @f to i8*), i8* @ca], section "llvm.metadata"
|
||||
; CHECK-DAG: @llvm.used = appending global [3 x i8*] [i8* bitcast (void ()* @fa to i8*), i8* bitcast (void ()* @f to i8*), i8* @ca], section "llvm.metadata"
|
||||
@ -18,17 +18,17 @@
|
||||
@other = global i32* bitcast (void ()* @fa to i32*)
|
||||
; CHECK-DAG: @other = global i32* bitcast (void ()* @f to i32*)
|
||||
|
||||
@fa = internal alias void ()* @f
|
||||
; CHECK: @fa = internal alias void ()* @f
|
||||
@fa = internal alias void (), void ()* @f
|
||||
; CHECK: @fa = internal alias void (), void ()* @f
|
||||
|
||||
@fa2 = internal alias void ()* @f
|
||||
@fa2 = internal alias void (), void ()* @f
|
||||
; CHECK-NOT: @fa2
|
||||
|
||||
@fa3 = internal alias void ()* @f
|
||||
@fa3 = internal alias void (), void ()* @f
|
||||
; CHECK: @fa3
|
||||
|
||||
@ca = internal alias i8* @c
|
||||
; CHECK: @ca = internal alias i8* @c
|
||||
@ca = internal alias i8, i8* @c
|
||||
; CHECK: @ca = internal alias i8, i8* @c
|
||||
|
||||
define void @f() {
|
||||
ret void
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: opt < %s -instcombine -S | grep icmp
|
||||
; PR1646
|
||||
|
||||
@__gthrw_pthread_cancel = weak alias i32 (i32)* @pthread_cancel ; <i32 (i32)*> [#uses=1]
|
||||
@__gthrw_pthread_cancel = weak alias i32 (i32), i32 (i32)* @pthread_cancel ; <i32 (i32)*> [#uses=1]
|
||||
@__gthread_active_ptr.5335 = internal constant i8* bitcast (i32 (i32)* @__gthrw_pthread_cancel to i8*) ; <i8**> [#uses=1]
|
||||
define weak i32 @pthread_cancel(i32) {
|
||||
ret i32 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: opt < %s -instcombine -S | grep icmp
|
||||
; PR1678
|
||||
|
||||
@A = weak alias void ()* @B ; <void ()*> [#uses=1]
|
||||
@A = weak alias void (), void ()* @B ; <void ()*> [#uses=1]
|
||||
|
||||
define weak void @B() {
|
||||
ret void
|
||||
|
@ -7,7 +7,7 @@ target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
@0 = constant [1 x i8*] zeroinitializer
|
||||
|
||||
@vtbl = alias getelementptr inbounds ([1 x i8*], [1 x i8*]* @0, i32 0, i32 0)
|
||||
@vtbl = alias i8*, getelementptr inbounds ([1 x i8*], [1 x i8*]* @0, i32 0, i32 0)
|
||||
|
||||
define i32 (%class.A*)* @test() {
|
||||
; CHECK-LABEL: test
|
||||
|
@ -6,46 +6,46 @@ target datalayout = "e-p:32:32:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16
|
||||
; Cases that should be bitcast
|
||||
|
||||
; Test cast between scalars with same bit sizes
|
||||
@alias_i32_to_f32 = alias bitcast (i32 (i32)* @func_i32 to float (float)*)
|
||||
@alias_i32_to_f32 = alias float (float), bitcast (i32 (i32)* @func_i32 to float (float)*)
|
||||
|
||||
; Test cast between vectors with same number of elements and bit sizes
|
||||
@alias_v2i32_to_v2f32 = alias bitcast (<2 x i32> (<2 x i32>)* @func_v2i32 to <2 x float> (<2 x float>)*)
|
||||
@alias_v2i32_to_v2f32 = alias <2 x float> (<2 x float>), bitcast (<2 x i32> (<2 x i32>)* @func_v2i32 to <2 x float> (<2 x float>)*)
|
||||
|
||||
; Test cast from vector to scalar with same number of bits
|
||||
@alias_v2f32_to_i64 = alias bitcast (i64 (i64)* @func_i64 to <2 x float> (<2 x float>)*)
|
||||
@alias_v2f32_to_i64 = alias <2 x float> (<2 x float>), bitcast (i64 (i64)* @func_i64 to <2 x float> (<2 x float>)*)
|
||||
|
||||
; Test cast from scalar to vector with same number of bits
|
||||
@alias_i64_to_v2f32 = alias bitcast (<2 x float> (<2 x float>)* @func_v2f32 to i64 (i64)*)
|
||||
@alias_i64_to_v2f32 = alias i64 (i64), bitcast (<2 x float> (<2 x float>)* @func_v2f32 to i64 (i64)*)
|
||||
|
||||
; Test cast between vectors of pointers
|
||||
@alias_v2i32p_to_v2i64p = alias bitcast (<2 x i32*> (<2 x i32*>)* @func_v2i32p to <2 x i64*> (<2 x i64*>)*)
|
||||
@alias_v2i32p_to_v2i64p = alias <2 x i64*> (<2 x i64*>), bitcast (<2 x i32*> (<2 x i32*>)* @func_v2i32p to <2 x i64*> (<2 x i64*>)*)
|
||||
|
||||
|
||||
; Cases that should be invalid and unchanged
|
||||
|
||||
; Test cast between scalars with different bit sizes
|
||||
@alias_i64_to_f32 = alias bitcast (i64 (i64)* @func_i64 to float (float)*)
|
||||
@alias_i64_to_f32 = alias float (float), bitcast (i64 (i64)* @func_i64 to float (float)*)
|
||||
|
||||
; Test cast between vectors with different bit sizes but the
|
||||
; same number of elements
|
||||
@alias_v2i64_to_v2f32 = alias bitcast (<2 x i64> (<2 x i64>)* @func_v2i64 to <2 x float> (<2 x float>)*)
|
||||
@alias_v2i64_to_v2f32 = alias <2 x float> (<2 x float>), bitcast (<2 x i64> (<2 x i64>)* @func_v2i64 to <2 x float> (<2 x float>)*)
|
||||
|
||||
; Test cast between vectors with same number of bits and different
|
||||
; numbers of elements
|
||||
@alias_v2i32_to_v4f32 = alias bitcast (<2 x i32> (<2 x i32>)* @func_v2i32 to <4 x float> (<4 x float>)*)
|
||||
@alias_v2i32_to_v4f32 = alias <4 x float> (<4 x float>), bitcast (<2 x i32> (<2 x i32>)* @func_v2i32 to <4 x float> (<4 x float>)*)
|
||||
|
||||
; Test cast between scalar and vector with different number of bits
|
||||
@alias_i64_to_v4f32 = alias bitcast (<4 x float> (<4 x float>)* @func_v4f32 to i64 (i64)*)
|
||||
@alias_i64_to_v4f32 = alias i64 (i64), bitcast (<4 x float> (<4 x float>)* @func_v4f32 to i64 (i64)*)
|
||||
|
||||
; Test cast between vector and scalar with different number of bits
|
||||
@alias_v4f32_to_i64 = alias bitcast (i64 (i64)* @func_i64 to <4 x float> (<4 x float>)*)
|
||||
@alias_v4f32_to_i64 = alias <4 x float> (<4 x float>), bitcast (i64 (i64)* @func_i64 to <4 x float> (<4 x float>)*)
|
||||
|
||||
; Test cast from scalar to vector of pointers with same number of bits
|
||||
; We don't know the pointer size at this point, so this can't be done
|
||||
@alias_i64_to_v2i32p = alias bitcast (<2 x i32*> (<2 x i32*>)* @func_v2i32p to i64 (i64)*)
|
||||
@alias_i64_to_v2i32p = alias i64 (i64), bitcast (<2 x i32*> (<2 x i32*>)* @func_v2i32p to i64 (i64)*)
|
||||
|
||||
; Test cast between vector of pointers and scalar with different number of bits
|
||||
@alias_v4i32p_to_i64 = alias bitcast (i64 (i64)* @func_i64 to <4 x i32*> (<4 x i32*>)*)
|
||||
@alias_v4i32p_to_i64 = alias <4 x i32*> (<4 x i32*>), bitcast (i64 (i64)* @func_i64 to <4 x i32*> (<4 x i32*>)*)
|
||||
|
||||
|
||||
|
||||
|
@ -6,8 +6,8 @@ target datalayout = "e-p1:16:16-p2:32:32-p3:64:64"
|
||||
@G2 = global i32 42
|
||||
@G3 = global [4 x i8] zeroinitializer, align 1
|
||||
|
||||
@A1 = alias bitcast (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @G3, i32 0, i32 2) to i32*)
|
||||
@A2 = alias inttoptr (i64 and (i64 ptrtoint (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @G3, i32 0, i32 3) to i64), i64 -4) to i32*)
|
||||
@A1 = alias i32, bitcast (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @G3, i32 0, i32 2) to i32*)
|
||||
@A2 = alias i32, inttoptr (i64 and (i64 ptrtoint (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @G3, i32 0, i32 3) to i64), i64 -4) to i32*)
|
||||
|
||||
define i64 @f1() {
|
||||
; This cannot be constant folded because G1 is underaligned.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user