Update tests.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 16 Jan 2011 18:02:57 +0000 (18:02 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 16 Jan 2011 18:02:57 +0000 (18:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123591 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Mips/2008-07-15-InternalConstant.ll
test/CodeGen/X86/2009-01-27-NullStrings.ll
test/CodeGen/X86/addr-label-difference.ll
test/CodeGen/X86/global-sections.ll
test/CodeGen/X86/rodata-relocs.ll
test/CodeGen/XCore/globals.ll
test/MC/ELF/entsize.ll

index bda4a3172f309de2be4ca1d5e013af71ffa8b4c3..c3db6387aff3061528aec51b0e92e71b2c084f4d 100644 (file)
@@ -7,8 +7,8 @@
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
 target triple = "mipsallegrexel-unknown-psp-elf"
-@.str = internal constant [10 x i8] c"AAAAAAAAA\00"
-@i0 = internal constant [5 x i32] [ i32 0, i32 1, i32 2, i32 3, i32 4 ] 
+@.str = internal unnamed_addr constant [10 x i8] c"AAAAAAAAA\00"
+@i0 = internal unnamed_addr constant [5 x i32] [ i32 0, i32 1, i32 2, i32 3, i32 4 ] 
 
 define i8* @foo() nounwind {
 entry:
index 8684f4a19ca42d0538607a85563808e6ec2f948f..8b3094be4b06782ac8aeee7523cfb5bde089e33c 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llc < %s -mtriple=i686-apple-darwin | FileCheck %s
 ; CHECK: .section __TEXT,__cstring,cstring_literals
 
-@x = internal constant [1 x i8] zeroinitializer                ; <[1 x i8]*> [#uses=1]
+@x = internal unnamed_addr constant [1 x i8] zeroinitializer           ; <[1 x i8]*> [#uses=1]
 
 @y = global [1 x i8]* @x
 
index be0908aa1a9d7b86e7e0851ebd340f54ff9975e7..49abd8a92e6486d2513c55726e1dea16dad5c144 100644 (file)
@@ -5,7 +5,7 @@ target triple = "i386-apple-darwin10.0"
 
 ; This array should go into the __TEXT,__const section, not into the
 ; __DATA,__const section, because the elements don't need relocations.
-@test.array = internal constant [3 x i32] [i32 sub (i32 ptrtoint (i8* blockaddress(@test, %foo) to i32), i32 ptrtoint (i8* blockaddress(@test, %foo) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@test, %bar) to i32), i32 ptrtoint (i8* blockaddress(@test, %foo) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@test, %hack) to i32), i32 ptrtoint (i8* blockaddress(@test, %foo) to i32))] ; <[3 x i32]*> [#uses=1]
+@test.array = internal unnamed_addr constant [3 x i32] [i32 sub (i32 ptrtoint (i8* blockaddress(@test, %foo) to i32), i32 ptrtoint (i8* blockaddress(@test, %foo) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@test, %bar) to i32), i32 ptrtoint (i8* blockaddress(@test, %foo) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@test, %hack) to i32), i32 ptrtoint (i8* blockaddress(@test, %foo) to i32))] ; <[3 x i32]*> [#uses=1]
 
 define void @test(i32 %i) nounwind ssp {
 entry:
index 6d211913b0153eae0f58dd4bfab51dc42db01954..9db8603307745c3f87a9666233b84af6f2cafcc8 100644 (file)
@@ -15,7 +15,7 @@
 
 
 ; const int G2 __attribute__((weak)) = 42;
-@G2 = weak_odr constant i32 42 
+@G2 = weak_odr unnamed_addr constant i32 42    
 
 
 ; TODO: linux drops this into .rodata, we drop it into ".gnu.linkonce.r.G2"
@@ -26,7 +26,7 @@
 
 
 ; int * const G3 = &G1;
-@G3 = constant i32* @G1
+@G3 = unnamed_addr constant i32* @G1
 
 ; DARWIN: .section        __DATA,__const
 ; DARWIN: .globl _G3
@@ -41,7 +41,7 @@
 
 
 ; _Complex long long const G4 = 34;
-@G4 = constant {i64,i64} { i64 34, i64 0 }
+@G4 = unnamed_addr constant {i64,i64} { i64 34, i64 0 }
 
 ; DARWIN: .section        __TEXT,__const
 ; DARWIN: _G4:
@@ -76,7 +76,7 @@
 ; DARWIN: "_foo bar":
 
 ; PR4650
-@G6 = weak_odr constant [1 x i8] c"\01"
+@G6 = weak_odr unnamed_addr constant [1 x i8] c"\01"
 
 ; LINUX:   .type       G6,@object
 ; LINUX:   .section    .gnu.linkonce.r.G6,"a",@progbits
@@ -92,7 +92,7 @@
 ; DARWIN:  .byte 1
 
 
-@G7 = constant [10 x i8] c"abcdefghi\00"
+@G7 = unnamed_addr constant [10 x i8] c"abcdefghi\00"
 
 ; DARWIN:      __TEXT,__cstring,cstring_literals
 ; DARWIN:      .globl _G7
 ; LINUX-SECTIONS:      .globl G7
 
 
-@G8 = constant [4 x i16] [ i16 1, i16 2, i16 3, i16 0 ]
+@G8 = unnamed_addr constant [4 x i16] [ i16 1, i16 2, i16 3, i16 0 ]
 
 ; DARWIN:      .section        __TEXT,__const
 ; DARWIN:      .globl _G8
 ; LINUX:       .globl G8
 ; LINUX:G8:
 
-@G9 = constant [4 x i32] [ i32 1, i32 2, i32 3, i32 0 ]
+@G9 = unnamed_addr constant [4 x i32] [ i32 1, i32 2, i32 3, i32 0 ]
 
 ; DARWIN:      .globl _G9
 ; DARWIN: _G9:
index 276f8bb48d06eeb5d516edb1a95e27cfcd3f40ae..9291200f0110fcd8a4d549092128ac465d9f4b2e 100644 (file)
@@ -8,14 +8,14 @@
 
 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"
-@a = internal constant [2 x i32] [i32 1, i32 2]
-@a1 = constant [2 x i32] [i32 1, i32 2]
-@e = internal constant [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]], align 16
-@e1 = constant [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]], align 16
-@p = constant i8* bitcast ([2 x i32]* @a to i8*)
-@t = constant i8* bitcast ([2 x [2 x i32]]* @e to i8*)
-@p1 = constant i8* bitcast ([2 x i32]* @a1 to i8*)
-@t1 = constant i8* bitcast ([2 x [2 x i32]]* @e1 to i8*)
+@a = internal unnamed_addr constant [2 x i32] [i32 1, i32 2]
+@a1 = unnamed_addr constant [2 x i32] [i32 1, i32 2]
+@e = internal  unnamed_addr constant [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]], align 16
+@e1 = unnamed_addr constant [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]], align 16
+@p = unnamed_addr constant i8* bitcast ([2 x i32]* @a to i8*)
+@t = unnamed_addr constant i8* bitcast ([2 x [2 x i32]]* @e to i8*)
+@p1 = unnamed_addr constant i8* bitcast ([2 x i32]* @a1 to i8*)
+@t1 = unnamed_addr constant i8* bitcast ([2 x [2 x i32]]* @e1 to i8*)
 @p2 = internal global i8* bitcast([2 x i32]* @a1 to i8*)
 @t2 = internal global i8* bitcast([2 x [2 x i32]]* @e1 to i8*)
 @p3 = internal global i8* bitcast([2 x i32]* @a to i8*)
index 342e5932dd10602b72d2bea3034617f7e12131d7..7487561dec96d28f1d73b5f7d24b368e4438078c 100644 (file)
@@ -67,7 +67,7 @@ entry:
 ; CHECK: .section .dp.bss,"awd",@nobits
 ; CHECK: G2:
 
-@G3 = constant i32 9401
+@G3 = unnamed_addr constant i32 9401
 ; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4
 ; CHECK: G3:
 
@@ -75,7 +75,7 @@ entry:
 ; CHECK: .section .dp.data,"awd",@progbits
 ; CHECK: G4:
 
-@G5 = constant i32* @G1
+@G5 = unnamed_addr constant i32* @G1
 ; CHECK: .section .cp.rodata,"ac",@progbits
 ; CHECK: G5:
 
@@ -83,7 +83,7 @@ entry:
 ; CHECK: .section .dp.data,"awd",@progbits
 ; CHECK: G6:
 
-@G7 = constant i32* @G8
+@G7 = unnamed_addr constant i32* @G8
 ; CHECK: .section .cp.rodata,"ac",@progbits
 ; CHECK: G7:
 
index 62683af03539e82bd07e54cd93be0ea1257ffe9f..21179dfda9a3862fcaa6f385a635f05d2b171543 100644 (file)
@@ -2,10 +2,10 @@
 
 ; Test that constant mergeable strings have sh_entsize set.
 
-@.str1 = private constant [6 x i8] c"tring\00"
-@.str2 = private constant [7 x i8] c"String\00"
-@.c8a = private constant [1 x i64] [i64 42]
-@.c8b = private constant [1 x i64] [i64 42]
+@.str1 = private unnamed_addr constant [6 x i8] c"tring\00"
+@.str2 = private unnamed_addr constant [7 x i8] c"String\00"
+@.c8a = private unnamed_addr constant [1 x i64] [i64 42]
+@.c8b = private unnamed_addr constant [1 x i64] [i64 42]
 
 define i32 @main() nounwind {
   %1 = call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0))