[llvm] a41f076 - [test] Fix tools/gold/X86/weak.ll after D94202

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 16:04:28 PDT 2021


Author: Fangrui Song
Date: 2021-04-26T16:04:22-07:00
New Revision: a41f076ef1d611fcd255514d0c19cb06375e49b2

URL: https://github.com/llvm/llvm-project/commit/a41f076ef1d611fcd255514d0c19cb06375e49b2
DIFF: https://github.com/llvm/llvm-project/commit/a41f076ef1d611fcd255514d0c19cb06375e49b2.diff

LOG: [test] Fix tools/gold/X86/weak.ll after D94202

The order regressed after D94202: after `a b`, when adding `a c`, we may reorder
`a` to the right of `b`, causing the final order to be `b a c`.

Added: 
    

Modified: 
    llvm/test/tools/gold/X86/Inputs/weak.ll
    llvm/test/tools/gold/X86/weak.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/gold/X86/Inputs/weak.ll b/llvm/test/tools/gold/X86/Inputs/weak.ll
index 5209d343f23f3..8aba5b261001c 100644
--- a/llvm/test/tools/gold/X86/Inputs/weak.ll
+++ b/llvm/test/tools/gold/X86/Inputs/weak.ll
@@ -1,3 +1,4 @@
+target triple = "x86_64-unknown-linux-gnu"
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 @a = weak global i32 41

diff  --git a/llvm/test/tools/gold/X86/weak.ll b/llvm/test/tools/gold/X86/weak.ll
index 384a0ab3ae8c2..340de107b43b8 100644
--- a/llvm/test/tools/gold/X86/weak.ll
+++ b/llvm/test/tools/gold/X86/weak.ll
@@ -6,6 +6,7 @@
 ; RUN:    -shared %t.o %t2.o -o %t3.o
 ; RUN: llvm-dis %t3.o -o - | FileCheck %s
 
+target triple = "x86_64-unknown-linux-gnu"
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 @a = weak global i32 42
@@ -13,6 +14,6 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 ; Test that @b and @c end up pointing to the same variable.
 
-; CHECK: @a = weak global i32 42
 ; CHECK: @b = global i32* @a{{$}}
+; CHECK: @a = weak global i32 42
 ; CHECK: @c = global i32* @a{{$}}


        


More information about the llvm-commits mailing list