[llvm] r280256 - [LTO] Fix common test to reflect r279911 and move to X86 subdirectory

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 09:15:39 PDT 2016


Author: tejohnson
Date: Wed Aug 31 11:15:39 2016
New Revision: 280256

URL: http://llvm.org/viewvc/llvm-project?rev=280256&view=rev
Log:
[LTO] Fix common test to reflect r279911 and move to X86 subdirectory

Adjust the test to reflect the changes to common handling in r279911.
This test wasn't running due to an incorrect REQUIRES and thus missed
being modified for r279911 before. It was changed to XFAIL when the
bad REQUIRES was discovered.

Remove the XFAIL and move to a new X86 subdirectory that will properly
disable on non-X86.

Added:
    llvm/trunk/test/tools/llvm-lto2/X86/
    llvm/trunk/test/tools/llvm-lto2/X86/Inputs/
    llvm/trunk/test/tools/llvm-lto2/X86/Inputs/common.ll
      - copied, changed from r280191, llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll
    llvm/trunk/test/tools/llvm-lto2/X86/common.ll
      - copied, changed from r280191, llvm/trunk/test/tools/llvm-lto2/common.ll
    llvm/trunk/test/tools/llvm-lto2/X86/lit.local.cfg
Removed:
    llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll
    llvm/trunk/test/tools/llvm-lto2/common.ll

Removed: llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll?rev=280255&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll (original)
+++ llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll (removed)
@@ -1,7 +0,0 @@
-target triple = "x86_64-apple-macosx10.11.0"
-
- at v = common global i16 0, align 4
-
-define i16 *@bar() {
- ret i16 *@v
-}
\ No newline at end of file

Copied: llvm/trunk/test/tools/llvm-lto2/X86/Inputs/common.ll (from r280191, llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-lto2/X86/Inputs/common.ll?p2=llvm/trunk/test/tools/llvm-lto2/X86/Inputs/common.ll&p1=llvm/trunk/test/tools/llvm-lto2/Inputs/common.ll&r1=280191&r2=280256&rev=280256&view=diff
==============================================================================
    (empty)

Copied: llvm/trunk/test/tools/llvm-lto2/X86/common.ll (from r280191, llvm/trunk/test/tools/llvm-lto2/common.ll)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-lto2/X86/common.ll?p2=llvm/trunk/test/tools/llvm-lto2/X86/common.ll&p1=llvm/trunk/test/tools/llvm-lto2/common.ll&r1=280191&r2=280256&rev=280256&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-lto2/common.ll (original)
+++ llvm/trunk/test/tools/llvm-lto2/X86/common.ll Wed Aug 31 11:15:39 2016
@@ -1,4 +1,3 @@
-; XFAIL: *
 ; RUN: llvm-as < %s > %t1.bc
 ; RUN: llvm-as < %p/Inputs/common.ll > %t2.bc
 
@@ -10,7 +9,7 @@
 ; RUN:  -r %t2.bc,v,px \
 ; RUN:  -r %t1.bc,foo,px \
 ; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s
+; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=LARGE-PREVAILED
 
 ; Same as before, but reversing the order of the inputs
 ; RUN: llvm-lto2 %t2.bc %t1.bc -o %t.o -save-temps \
@@ -18,7 +17,7 @@
 ; RUN:  -r %t2.bc,v,px \
 ; RUN:  -r %t1.bc,foo,px \
 ; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s
+; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=LARGE-PREVAILED
 
 
 ; Client marked the "small with large alignment" one as prevailing
@@ -27,7 +26,7 @@
 ; RUN:  -r %t2.bc,v,x \
 ; RUN:  -r %t1.bc,foo,px \
 ; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s
+; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=SMALL-PREVAILED
 
 ; Same as before, but reversing the order of the inputs
 ; RUN: llvm-lto2 %t2.bc %t1.bc -o %t.o -save-temps \
@@ -35,7 +34,7 @@
 ; RUN:  -r %t2.bc,v,x \
 ; RUN:  -r %t1.bc,foo,px \
 ; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s
+; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s --check-prefix=SMALL-PREVAILED
 
 
 ; Client didn't mark any as prevailing, we keep the first one we see as "external"
@@ -44,7 +43,7 @@
 ; RUN:  -r %t2.bc,v,x \
 ; RUN:  -r %t1.bc,foo,px \
 ; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s
+; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s --check-prefix=NONE-PREVAILED1
 
 ; Same as before, but reversing the order of the inputs
 ; RUN: llvm-lto2 %t2.bc %t1.bc -o %t.o -save-temps \
@@ -52,14 +51,18 @@
 ; RUN:  -r %t2.bc,v,x \
 ; RUN:  -r %t1.bc,foo,px \
 ; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s
+; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s --check-prefix=NONE-PREVAILED2
 
 target triple = "x86_64-apple-macosx10.11.0"
 
 @v = common global i8 0, align 8
 
-
-; CHECK: @v = common global [2 x i8] zeroinitializer, align 8
+; LARGE-PREVAILED: @v = common global i16 0, align 8
+; SMALL-PREVAILED: @v = common global [2 x i8] zeroinitializer, align 8
+; In this case the first was kept as external, but we created a new merged
+; common due to the second requiring a larger size:
+; NONE-PREVAILED1: @v = common global [2 x i8] zeroinitializer, align 8
+; NONE-PREVAILED2: @v = external global i16, align 8
 
 define i8 *@foo() {
  ret i8 *@v

Added: llvm/trunk/test/tools/llvm-lto2/X86/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-lto2/X86/lit.local.cfg?rev=280256&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-lto2/X86/lit.local.cfg (added)
+++ llvm/trunk/test/tools/llvm-lto2/X86/lit.local.cfg Wed Aug 31 11:15:39 2016
@@ -0,0 +1,3 @@
+if not 'X86' in config.root.targets:
+  config.unsupported = True
+

Removed: llvm/trunk/test/tools/llvm-lto2/common.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-lto2/common.ll?rev=280255&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-lto2/common.ll (original)
+++ llvm/trunk/test/tools/llvm-lto2/common.ll (removed)
@@ -1,66 +0,0 @@
-; XFAIL: *
-; RUN: llvm-as < %s > %t1.bc
-; RUN: llvm-as < %p/Inputs/common.ll > %t2.bc
-
-; Test that the common merging (size + alignment) is properly handled
-
-; Client marked the "large with little alignment" one as prevailing
-; RUN: llvm-lto2 %t1.bc %t2.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,v,x \
-; RUN:  -r %t2.bc,v,px \
-; RUN:  -r %t1.bc,foo,px \
-; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s
-
-; Same as before, but reversing the order of the inputs
-; RUN: llvm-lto2 %t2.bc %t1.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,v,x \
-; RUN:  -r %t2.bc,v,px \
-; RUN:  -r %t1.bc,foo,px \
-; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s
-
-
-; Client marked the "small with large alignment" one as prevailing
-; RUN: llvm-lto2 %t1.bc %t2.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,v,px \
-; RUN:  -r %t2.bc,v,x \
-; RUN:  -r %t1.bc,foo,px \
-; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s
-
-; Same as before, but reversing the order of the inputs
-; RUN: llvm-lto2 %t2.bc %t1.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,v,px \
-; RUN:  -r %t2.bc,v,x \
-; RUN:  -r %t1.bc,foo,px \
-; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s
-
-
-; Client didn't mark any as prevailing, we keep the first one we see as "external"
-; RUN: llvm-lto2 %t1.bc %t2.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,v,x \
-; RUN:  -r %t2.bc,v,x \
-; RUN:  -r %t1.bc,foo,px \
-; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s
-
-; Same as before, but reversing the order of the inputs
-; RUN: llvm-lto2 %t2.bc %t1.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,v,x \
-; RUN:  -r %t2.bc,v,x \
-; RUN:  -r %t1.bc,foo,px \
-; RUN:  -r %t2.bc,bar,px
-; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck  %s
-
-target triple = "x86_64-apple-macosx10.11.0"
-
- at v = common global i8 0, align 8
-
-
-; CHECK: @v = common global [2 x i8] zeroinitializer, align 8
-
-define i8 *@foo() {
- ret i8 *@v
-}




More information about the llvm-commits mailing list