From b908f8ad6a38d989c7f769e329d778e563c398f4 Mon Sep 17 00:00:00 2001 From: Kenneth Uildriks Date: Tue, 3 Nov 2009 15:29:06 +0000 Subject: Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85900 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll | 1 + test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll | 1 + test/Analysis/BasicAA/featuretest.ll | 1 + test/Analysis/BasicAA/global-size.ll | 1 + test/Analysis/BasicAA/modref.ll | 3 ++- test/Analysis/BasicAA/store-promote.ll | 1 + test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll | 1 + test/CodeGen/X86/vec_ins_extract.ll | 1 + test/Transforms/ArgumentPromotion/aggregate-promote.ll | 1 + test/Transforms/ArgumentPromotion/basictest.ll | 1 + test/Transforms/ArgumentPromotion/byval.ll | 1 + test/Transforms/ArgumentPromotion/chained.ll | 1 + test/Transforms/ArgumentPromotion/control-flow2.ll | 1 + test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll | 1 + test/Transforms/DeadStoreElimination/PartialStore.ll | 1 + test/Transforms/DeadStoreElimination/context-sensitive.ll | 1 + test/Transforms/DeadStoreElimination/simple.ll | 1 + test/Transforms/GlobalOpt/globalsra-partial.ll | 1 + test/Transforms/GlobalOpt/globalsra.ll | 1 + test/Transforms/GlobalOpt/malloc-promote-1.ll | 1 + test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll | 1 + test/Transforms/IndVarSimplify/preserve-gep-remainder.ll | 1 + test/Transforms/Inline/basictest.ll | 1 + test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll | 1 + test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll | 1 + test/Transforms/InstCombine/align-2d-gep.ll | 1 + test/Transforms/InstCombine/align-addr.ll | 1 + test/Transforms/InstCombine/align-inc.ll | 1 + test/Transforms/InstCombine/alloca.ll | 1 + test/Transforms/InstCombine/call.ll | 1 + test/Transforms/InstCombine/cast-load-gep.ll | 1 + test/Transforms/InstCombine/cast.ll | 1 + test/Transforms/InstCombine/cast2.ll | 1 + test/Transforms/InstCombine/constant-fold-gep.ll | 1 + test/Transforms/InstCombine/fold-bin-operand.ll | 1 + test/Transforms/InstCombine/fp-ret-bitcast.ll | 1 + test/Transforms/InstCombine/loadstore-alignment.ll | 1 + test/Transforms/InstCombine/ptr-int-cast.ll | 1 + test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll | 1 + test/Transforms/MemCpyOpt/align.ll | 1 + test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll | 1 + test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll | 1 + test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll | 1 + test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll | 1 + test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll | 1 + test/Transforms/ScalarRepl/DifferingTypes.ll | 1 + test/Transforms/ScalarRepl/arraytest.ll | 1 + test/Transforms/ScalarRepl/basictest.ll | 1 + test/Transforms/ScalarRepl/bitfield-sroa.ll | 1 + test/Transforms/ScalarRepl/copy-aggregate.ll | 1 + test/Transforms/ScalarRepl/debuginfo.ll | 1 + test/Transforms/ScalarRepl/load-store-aggregate.ll | 1 + test/Transforms/ScalarRepl/memcpy-from-global.ll | 1 + test/Transforms/ScalarRepl/not-a-vector.ll | 1 + test/Transforms/ScalarRepl/union-fp-int.ll | 1 + test/Transforms/ScalarRepl/union-packed.ll | 1 + test/Transforms/ScalarRepl/vector_memcpy.ll | 1 + test/Transforms/ScalarRepl/vector_promote.ll | 1 + tools/opt/opt.cpp | 6 +----- 59 files changed, 60 insertions(+), 6 deletions(-) diff --git a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll index 5d08312..49327ac 100644 --- a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll +++ b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -aa-eval -disable-output |& grep {2 no alias respon} ; TEST that A[1][0] may alias A[0][i]. +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define void @test(i32 %N) { entry: diff --git a/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll b/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll index 5ea26e7..6475471 100644 --- a/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll +++ b/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll @@ -1,4 +1,5 @@ ; RUN: opt -gvn -instcombine -S < %s | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" declare i8 @llvm.atomic.load.add.i8.p0i8(i8*, i8) diff --git a/test/Analysis/BasicAA/featuretest.ll b/test/Analysis/BasicAA/featuretest.ll index 737ee45..50dc886 100644 --- a/test/Analysis/BasicAA/featuretest.ll +++ b/test/Analysis/BasicAA/featuretest.ll @@ -2,6 +2,7 @@ ; determine, as noted in the comments. ; RUN: opt < %s -basicaa -gvn -instcombine -dce -S | not grep REMOVE +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @Global = external global { i32 } diff --git a/test/Analysis/BasicAA/global-size.ll b/test/Analysis/BasicAA/global-size.ll index 0a643d4..b9cbbcc 100644 --- a/test/Analysis/BasicAA/global-size.ll +++ b/test/Analysis/BasicAA/global-size.ll @@ -2,6 +2,7 @@ ; the global. ; RUN: opt < %s -basicaa -gvn -instcombine -S | not grep load +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @B = global i16 8 ; [#uses=2] diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index 69b60d7..02db861 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -basicaa -gvn -dse -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" declare void @llvm.memset.i32(i8*, i8, i32, i32) declare void @llvm.memset.i8(i8*, i8, i8, i32) @@ -88,4 +89,4 @@ define void @test3a(i8* %P, i8 %X) { call void @llvm.lifetime.end(i64 10, i8* %P) ret void ; CHECK: ret void -} \ No newline at end of file +} diff --git a/test/Analysis/BasicAA/store-promote.ll b/test/Analysis/BasicAA/store-promote.ll index d8e7c75..33d0f3a 100644 --- a/test/Analysis/BasicAA/store-promote.ll +++ b/test/Analysis/BasicAA/store-promote.ll @@ -3,6 +3,7 @@ ; two pointers, then the load should be hoisted, and the store sunk. ; RUN: opt < %s -basicaa -licm -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @A = global i32 7 ; [#uses=3] @B = global i32 8 ; [#uses=2] diff --git a/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll b/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll index 6ed2614..e81530e 100644 --- a/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll +++ b/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep {count is 2} ; PR3171 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" %struct.Foo = type { i32 } %struct.NonPod = type { [2 x %struct.Foo] } diff --git a/test/CodeGen/X86/vec_ins_extract.ll b/test/CodeGen/X86/vec_ins_extract.ll index bf43deb..daf222e 100644 --- a/test/CodeGen/X86/vec_ins_extract.ll +++ b/test/CodeGen/X86/vec_ins_extract.ll @@ -3,6 +3,7 @@ ; This checks that various insert/extract idiom work without going to the ; stack. +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" define void @test(<4 x float>* %F, float %f) { entry: diff --git a/test/Transforms/ArgumentPromotion/aggregate-promote.ll b/test/Transforms/ArgumentPromotion/aggregate-promote.ll index 6a60e61..12de511 100644 --- a/test/Transforms/ArgumentPromotion/aggregate-promote.ll +++ b/test/Transforms/ArgumentPromotion/aggregate-promote.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -argpromotion -instcombine -S | not grep load +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" %QuadTy = type { i32, i32, i32, i32 } @G = constant %QuadTy { diff --git a/test/Transforms/ArgumentPromotion/basictest.ll b/test/Transforms/ArgumentPromotion/basictest.ll index 87f6371..ac9d7bf 100644 --- a/test/Transforms/ArgumentPromotion/basictest.ll +++ b/test/Transforms/ArgumentPromotion/basictest.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -argpromotion -mem2reg -S | not grep alloca +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define internal i32 @test(i32* %X, i32* %Y) { %A = load i32* %X ; [#uses=1] %B = load i32* %Y ; [#uses=1] diff --git a/test/Transforms/ArgumentPromotion/byval.ll b/test/Transforms/ArgumentPromotion/byval.ll index 052528a..44b26fc 100644 --- a/test/Transforms/ArgumentPromotion/byval.ll +++ b/test/Transforms/ArgumentPromotion/byval.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -argpromotion -scalarrepl -S | not grep load +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; Argpromote + scalarrepl should change this to passing the two integers by value. %struct.ss = type { i32, i64 } diff --git a/test/Transforms/ArgumentPromotion/chained.ll b/test/Transforms/ArgumentPromotion/chained.ll index 5ccb752..c9a4538 100644 --- a/test/Transforms/ArgumentPromotion/chained.ll +++ b/test/Transforms/ArgumentPromotion/chained.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -argpromotion -instcombine -S | not grep load +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @G1 = constant i32 0 ; [#uses=1] @G2 = constant i32* @G1 ; [#uses=1] diff --git a/test/Transforms/ArgumentPromotion/control-flow2.ll b/test/Transforms/ArgumentPromotion/control-flow2.ll index 79b44d4..9a8afc3 100644 --- a/test/Transforms/ArgumentPromotion/control-flow2.ll +++ b/test/Transforms/ArgumentPromotion/control-flow2.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -argpromotion -S | \ ; RUN: grep {load i32\\* %A} +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define internal i32 @callee(i1 %C, i32* %P) { br i1 %C, label %T, label %F diff --git a/test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll b/test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll index 4a5d6e2..9fcbf07 100644 --- a/test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll +++ b/test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -dse -S | not grep tmp5 ; PR2599 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define void @foo({ i32, i32 }* %x) nounwind { entry: diff --git a/test/Transforms/DeadStoreElimination/PartialStore.ll b/test/Transforms/DeadStoreElimination/PartialStore.ll index 0881cb9..ab1edf5 100644 --- a/test/Transforms/DeadStoreElimination/PartialStore.ll +++ b/test/Transforms/DeadStoreElimination/PartialStore.ll @@ -2,6 +2,7 @@ ; RUN: not grep {store i8} ; Ensure that the dead store is deleted in this case. It is wholely ; overwritten by the second store. +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define i32 @test() { %V = alloca i32 ; [#uses=3] %V2 = bitcast i32* %V to i8* ; [#uses=1] diff --git a/test/Transforms/DeadStoreElimination/context-sensitive.ll b/test/Transforms/DeadStoreElimination/context-sensitive.ll index 0da416c..7954310 100644 --- a/test/Transforms/DeadStoreElimination/context-sensitive.ll +++ b/test/Transforms/DeadStoreElimination/context-sensitive.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -dse -S | not grep DEAD +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" declare void @ext() diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll index e89d3ab..d859640 100644 --- a/test/Transforms/DeadStoreElimination/simple.ll +++ b/test/Transforms/DeadStoreElimination/simple.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -dse -S | not grep DEAD +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define void @test(i32* %Q, i32* %P) { %DEAD = load i32* %Q ; [#uses=1] diff --git a/test/Transforms/GlobalOpt/globalsra-partial.ll b/test/Transforms/GlobalOpt/globalsra-partial.ll index 9a068e9..06485b5 100644 --- a/test/Transforms/GlobalOpt/globalsra-partial.ll +++ b/test/Transforms/GlobalOpt/globalsra-partial.ll @@ -1,6 +1,7 @@ ; In this case, the global can only be broken up by one level. ; RUN: opt < %s -globalopt -S | not grep 12345 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @G = internal global { i32, [4 x float] } zeroinitializer ; <{ i32, [4 x float] }*> [#uses=3] diff --git a/test/Transforms/GlobalOpt/globalsra.ll b/test/Transforms/GlobalOpt/globalsra.ll index 276ca64..6d8f220 100644 --- a/test/Transforms/GlobalOpt/globalsra.ll +++ b/test/Transforms/GlobalOpt/globalsra.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -globalopt -S | not grep global +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @G = internal global { i32, float, { double } } { i32 1, diff --git a/test/Transforms/GlobalOpt/malloc-promote-1.ll b/test/Transforms/GlobalOpt/malloc-promote-1.ll index 5d4696f..fd510e3 100644 --- a/test/Transforms/GlobalOpt/malloc-promote-1.ll +++ b/test/Transforms/GlobalOpt/malloc-promote-1.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -globalopt -S | not grep global +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @G = internal global i32* null ; [#uses=3] diff --git a/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll b/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll index 86e90c7..3a5c0b6 100644 --- a/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll +++ b/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll @@ -2,6 +2,7 @@ ; RUN: not grep inttoptr %t ; RUN: not grep ptrtoint %t ; RUN: grep scevgep %t +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; Indvars shouldn't need inttoptr/ptrtoint to expand an address here. diff --git a/test/Transforms/IndVarSimplify/preserve-gep-remainder.ll b/test/Transforms/IndVarSimplify/preserve-gep-remainder.ll index d249432..e17368b 100644 --- a/test/Transforms/IndVarSimplify/preserve-gep-remainder.ll +++ b/test/Transforms/IndVarSimplify/preserve-gep-remainder.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -indvars -S \ ; RUN: | grep {\[%\]p.2.ip.1 = getelementptr \\\[3 x \\\[3 x double\\\]\\\]\\* \[%\]p, i64 2, i64 \[%\]tmp, i64 1} +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; Indvars shouldn't expand this to ; %p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %tmp, i64 19 diff --git a/test/Transforms/Inline/basictest.ll b/test/Transforms/Inline/basictest.ll index e61f50c..6531b9e 100644 --- a/test/Transforms/Inline/basictest.ll +++ b/test/Transforms/Inline/basictest.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -inline -scalarrepl -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define i32 @test1f(i32 %i) { ret i32 %i diff --git a/test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll b/test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll index 4d3d48e..fdb8fd9 100644 --- a/test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll +++ b/test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" declare void @free(i8*) diff --git a/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll b/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll index 3862de4..710aff2 100644 --- a/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll +++ b/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -instcombine -S | not grep call ; RUN: opt < %s -std-compile-opts -S | not grep xyz +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @.str = internal constant [4 x i8] c"xyz\00" ; <[4 x i8]*> [#uses=1] diff --git a/test/Transforms/InstCombine/align-2d-gep.ll b/test/Transforms/InstCombine/align-2d-gep.ll index 80aacbc..eeca5c0 100644 --- a/test/Transforms/InstCombine/align-2d-gep.ll +++ b/test/Transforms/InstCombine/align-2d-gep.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S | grep {align 16} | count 1 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; A multi-dimensional array in a nested loop doing vector stores that ; aren't yet aligned. Instcombine can understand the addressing in the diff --git a/test/Transforms/InstCombine/align-addr.ll b/test/Transforms/InstCombine/align-addr.ll index 4253937..d8ad5a9 100644 --- a/test/Transforms/InstCombine/align-addr.ll +++ b/test/Transforms/InstCombine/align-addr.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S | grep {align 16} | count 1 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; Instcombine should be able to prove vector alignment in the ; presence of a few mild address computation tricks. diff --git a/test/Transforms/InstCombine/align-inc.ll b/test/Transforms/InstCombine/align-inc.ll index 0260ca2..71512b3 100644 --- a/test/Transforms/InstCombine/align-inc.ll +++ b/test/Transforms/InstCombine/align-inc.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -instcombine -S | grep {GLOBAL.*align 16} ; RUN: opt < %s -instcombine -S | grep {tmp = load} +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @GLOBAL = internal global [4 x i32] zeroinitializer diff --git a/test/Transforms/InstCombine/alloca.ll b/test/Transforms/InstCombine/alloca.ll index 13d664d..b9add4d 100644 --- a/test/Transforms/InstCombine/alloca.ll +++ b/test/Transforms/InstCombine/alloca.ll @@ -1,4 +1,5 @@ ; Zero byte allocas should be deleted. +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; RUN: opt < %s -instcombine -S | \ ; RUN: not grep alloca diff --git a/test/Transforms/InstCombine/call.ll b/test/Transforms/InstCombine/call.ll index 1e37eec..05c063d 100644 --- a/test/Transforms/InstCombine/call.ll +++ b/test/Transforms/InstCombine/call.ll @@ -1,6 +1,7 @@ ; Ignore stderr, we expect warnings there ; RUN: opt < %s -instcombine 2> /dev/null -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; Simple case, argument translatable without changing the value declare void @test1a(i8*) diff --git a/test/Transforms/InstCombine/cast-load-gep.ll b/test/Transforms/InstCombine/cast-load-gep.ll index 57f021c..271c737 100644 --- a/test/Transforms/InstCombine/cast-load-gep.ll +++ b/test/Transforms/InstCombine/cast-load-gep.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -instcombine -globaldce -S | \ ; RUN: not grep Array +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" ; Pulling the cast out of the load allows us to eliminate the load, and then ; the whole array. diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index c5266f3..79f86e9 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -1,5 +1,6 @@ ; Tests to make sure elimination of casts is working correctly ; RUN: opt < %s -instcombine -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @inbuf = external global [32832 x i8] ; <[32832 x i8]*> [#uses=1] diff --git a/test/Transforms/InstCombine/cast2.ll b/test/Transforms/InstCombine/cast2.ll index 0ae869f..2941ee0 100644 --- a/test/Transforms/InstCombine/cast2.ll +++ b/test/Transforms/InstCombine/cast2.ll @@ -1,5 +1,6 @@ ; Tests to make sure elimination of casts is working correctly ; RUN: opt < %s -instcombine -S | FileCheck %s +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define i16 @test1(i16 %a) { %tmp = zext i16 %a to i32 ; [#uses=2] diff --git a/test/Transforms/InstCombine/constant-fold-gep.ll b/test/Transforms/InstCombine/constant-fold-gep.ll index 5a7aef3..4be1a9c 100644 --- a/test/Transforms/InstCombine/constant-fold-gep.ll +++ b/test/Transforms/InstCombine/constant-fold-gep.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S | FileCheck %s +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" ; Constant folding should fix notionally out-of-bounds indices ; and add inbounds keywords. diff --git a/test/Transforms/InstCombine/fold-bin-operand.ll b/test/Transforms/InstCombine/fold-bin-operand.ll index b837985..d0d072a 100644 --- a/test/Transforms/InstCombine/fold-bin-operand.ll +++ b/test/Transforms/InstCombine/fold-bin-operand.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S | not grep icmp +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define i1 @f(i1 %x) { %b = and i1 %x, icmp eq (i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 2 to i8*)) diff --git a/test/Transforms/InstCombine/fp-ret-bitcast.ll b/test/Transforms/InstCombine/fp-ret-bitcast.ll index 169340a..35ece42 100644 --- a/test/Transforms/InstCombine/fp-ret-bitcast.ll +++ b/test/Transforms/InstCombine/fp-ret-bitcast.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -instcombine -S | \ ; RUN: grep {call float bitcast} | count 1 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" %struct.NSObject = type { %struct.objc_class* } %struct.NSArray = type { %struct.NSObject } %struct.objc_class = type opaque diff --git a/test/Transforms/InstCombine/loadstore-alignment.ll b/test/Transforms/InstCombine/loadstore-alignment.ll index ff34017..9fbe683 100644 --- a/test/Transforms/InstCombine/loadstore-alignment.ll +++ b/test/Transforms/InstCombine/loadstore-alignment.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S | grep {, align 16} | count 14 +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" @x = external global <2 x i64>, align 16 @xx = external global [13 x <2 x i64>], align 16 diff --git a/test/Transforms/InstCombine/ptr-int-cast.ll b/test/Transforms/InstCombine/ptr-int-cast.ll index 2f64d8b..c7ae689 100644 --- a/test/Transforms/InstCombine/ptr-int-cast.ll +++ b/test/Transforms/InstCombine/ptr-int-cast.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -instcombine -S > %t +target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" define i1 @test1(i32 *%x) nounwind { entry: diff --git a/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll b/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll index 13205e6..38a7271 100644 --- a/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll +++ b/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -memcpyopt -S | not grep {call.*memcpy.} +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" %a = type { i32 } %b = type { float } diff --git a/test/Transforms/MemCpyOpt/align.ll b/test/Transforms/MemCpyOpt/align.ll index a9d0337..47df380 100644 --- a/test/Transforms/MemCpyOpt/align.ll +++ b/test/Transforms/MemCpyOpt/align.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -S -memcpyopt | FileCheck %s +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" ; The resulting memset is only 4-byte aligned, despite containing ; a 16-byte alignmed store in the middle. diff --git a/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll b/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll index 824e249..7116199 100644 --- a/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll +++ b/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -scalarrepl -instcombine -S | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" ; Test that an array is not incorrectly deconstructed. diff --git a/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll b/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll index 4655d14..99c9fb9 100644 --- a/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll +++ b/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -scalarrepl -S | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind { %vsiidx = alloca [2 x <4 x i32>], align 16 ; <[2 x <4 x i32>]*> [#uses=3] diff --git a/test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll b/test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll index 3ebafd0..87a08b7 100644 --- a/test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll +++ b/test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll @@ -4,6 +4,7 @@ ; values. This checks of scalarrepl splits up the struct and array properly. ; RUN: opt < %s -scalarrepl -S | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define i32 @foo() { %target = alloca { i32, i32 } ; <{ i32, i32 }*> [#uses=1] diff --git a/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll b/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll index e89be5a..e32e683 100644 --- a/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll +++ b/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll @@ -5,6 +5,7 @@ ; RUN: opt < %s -scalarrepl -S > %t ; RUN: cat %t | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" %struct.two = type <{ < 2 x i8 >, i16 }> diff --git a/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll b/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll index d6eb75b..526457b 100644 --- a/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll +++ b/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll @@ -2,6 +2,7 @@ ; is only known to access it with 1-byte alignment. ; RUN: opt < %s -scalarrepl -S | grep {store i16 1, .*, align 1} ; PR3720 +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" %struct.st = type { i16 } diff --git a/test/Transforms/ScalarRepl/DifferingTypes.ll b/test/Transforms/ScalarRepl/DifferingTypes.ll index eb56824..933c47f 100644 --- a/test/Transforms/ScalarRepl/DifferingTypes.ll +++ b/test/Transforms/ScalarRepl/DifferingTypes.ll @@ -3,6 +3,7 @@ ; depending on the endianness of the target... ; RUN: opt < %s -scalarrepl -S | \ ; RUN: not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define i32 @testfunc(i32 %i, i8 %j) { %I = alloca i32 ; [#uses=3] diff --git a/test/Transforms/ScalarRepl/arraytest.ll b/test/Transforms/ScalarRepl/arraytest.ll index 2f68af8..06a928c 100644 --- a/test/Transforms/ScalarRepl/arraytest.ll +++ b/test/Transforms/ScalarRepl/arraytest.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -scalarrepl -mem2reg -S | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define i32 @test() { %X = alloca [4 x i32] ; <[4 x i32]*> [#uses=1] diff --git a/test/Transforms/ScalarRepl/basictest.ll b/test/Transforms/ScalarRepl/basictest.ll index a43243c..a26b62d 100644 --- a/test/Transforms/ScalarRepl/basictest.ll +++ b/test/Transforms/ScalarRepl/basictest.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -scalarrepl -mem2reg -S | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define i32 @test() { %X = alloca { i32, float } ; <{ i32, float }*> [#uses=1] diff --git a/test/Transforms/ScalarRepl/bitfield-sroa.ll b/test/Transforms/ScalarRepl/bitfield-sroa.ll index 6b3d414..3728658 100644 --- a/test/Transforms/ScalarRepl/bitfield-sroa.ll +++ b/test/Transforms/ScalarRepl/bitfield-sroa.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -scalarrepl -S | not grep alloca ; rdar://6532315 +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" %t = type { { i32, i16, i8, i8 } } define i8 @foo(i64 %A) { diff --git a/test/Transforms/ScalarRepl/copy-aggregate.ll b/test/Transforms/ScalarRepl/copy-aggregate.ll index 26f007b..2992413 100644 --- a/test/Transforms/ScalarRepl/copy-aggregate.ll +++ b/test/Transforms/ScalarRepl/copy-aggregate.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -scalarrepl -S | not grep alloca ; PR3290 +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" ;; Store of integer to whole alloca struct. define i32 @test1(i64 %V) nounwind { diff --git a/test/Transforms/ScalarRepl/debuginfo.ll b/test/Transforms/ScalarRepl/debuginfo.ll index 903b1a2..6b8422c 100644 --- a/test/Transforms/ScalarRepl/debuginfo.ll +++ b/test/Transforms/ScalarRepl/debuginfo.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -scalarrepl -S | not grep alloca +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" %llvm.dbg.anchor.type = type { i32, i32 } %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* } diff --git a/test/Transforms/ScalarRepl/load-store-aggregate.ll b/test/Transforms/ScalarRepl/load-store-aggregate.ll index 9ea3895..c5008ac 100644 --- a/test/Transforms/ScalarRepl/load-store-aggregate.ll +++ b/test/Transforms/ScalarRepl/load-store-aggregate.ll @@ -1,6 +1,7 @@ ; This testcase shows that scalarrepl is able to replace struct alloca's which ; are directly loaded from or stored to (using the first class aggregates ; feature). +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" ; RUN: opt < %s -scalarrepl -S > %t ; RUN: cat %t | not grep alloca diff --git a/test/Transforms/ScalarRepl/memcpy-from-global.ll b/test/Transforms/ScalarRepl/memcpy-from-global.ll index 38a2ca0..8152785 100644 --- a/test/Transforms/ScalarRepl/memcpy-from-global.ll +++ b/test/Transforms/ScalarRepl/memcpy-from-global.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -scalarrepl -S | not grep {call.*memcpy} +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" @C.0.1248 = internal constant [128 x float] [ float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00 ], align 32 ; <[128 x float]*> [#uses=1] define float @grad4(i32 %hash, float %x, float %y, float %z, float %w) { diff --git a/test/Transforms/ScalarRepl/not-a-vector.ll b/test/Transforms/ScalarRepl/not-a-vector.ll index 7eba7c0..f873456 100644 --- a/test/Transforms/ScalarRepl/not-a-vector.ll +++ b/test/Transforms/ScalarRepl/not-a-vector.ll @@ -1,6 +1,7 @@ ; RUN: opt < %s -scalarrepl -S | not grep alloca ; RUN: opt < %s -scalarrepl -S | not grep {7 x double} ; RUN: opt < %s -scalarrepl -instcombine -S | grep {ret double %B} +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define double @test(double %A, double %B) { %ARR = alloca [7 x i64] diff --git a/test/Transforms/ScalarRepl/union-fp-int.ll b/test/Transforms/ScalarRepl/union-fp-int.ll index 0e1cd23..8b7e50d 100644 --- a/test/Transforms/ScalarRepl/union-fp-int.ll +++ b/test/Transforms/ScalarRepl/union-fp-int.ll @@ -2,6 +2,7 @@ ; RUN: not grep alloca ; RUN: opt < %s -scalarrepl -S | \ ; RUN: grep {bitcast.*float.*i32} +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define i32 @test(float %X) { %X_addr = alloca float ; [#uses=2] diff --git a/test/Transforms/ScalarRepl/union-packed.ll b/test/Transforms/ScalarRepl/union-packed.ll index 63752c8..b272abf 100644 --- a/test/Transforms/ScalarRepl/union-packed.ll +++ b/test/Transforms/ScalarRepl/union-packed.ll @@ -2,6 +2,7 @@ ; RUN: not grep alloca ; RUN: opt < %s -scalarrepl -S | \ ; RUN: grep bitcast +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define <4 x i32> @test(<4 x float> %X) { %X_addr = alloca <4 x float> ; <<4 x float>*> [#uses=2] diff --git a/test/Transforms/ScalarRepl/vector_memcpy.ll b/test/Transforms/ScalarRepl/vector_memcpy.ll index 3af79bc..decbd30 100644 --- a/test/Transforms/ScalarRepl/vector_memcpy.ll +++ b/test/Transforms/ScalarRepl/vector_memcpy.ll @@ -1,6 +1,7 @@ ; RUN: opt < %s -scalarrepl -S > %t ; RUN: grep {ret <16 x float> %A} %t ; RUN: grep {ret <16 x float> zeroinitializer} %t +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define <16 x float> @foo(<16 x float> %A) nounwind { %tmp = alloca <16 x float>, align 16 diff --git a/test/Transforms/ScalarRepl/vector_promote.ll b/test/Transforms/ScalarRepl/vector_promote.ll index 0284b3d..4f875b0 100644 --- a/test/Transforms/ScalarRepl/vector_promote.ll +++ b/test/Transforms/ScalarRepl/vector_promote.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -scalarrepl -S | not grep alloca ; RUN: opt < %s -scalarrepl -S | grep {load <4 x float>} +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" define void @test(<4 x float>* %F, float %f) { entry: diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 1950a73..12bb2ec 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -132,10 +132,6 @@ DefaultDataLayout("default-data-layout", cl::desc("data layout string to use if not specified by module"), cl::value_desc("layout-string"), cl::init("")); -static cl::opt -NoDefaultDataLayout("no-default-data-layout", - cl::desc("no data layout assumptions unless module specifies data layout")); - // ---------- Define Printers for module and function passes ------------ namespace { @@ -401,7 +397,7 @@ int main(int argc, char **argv) { const std::string &ModuleDataLayout = M.get()->getDataLayout(); if (!ModuleDataLayout.empty()) TD = new TargetData(ModuleDataLayout); - else if (!NoDefaultDataLayout) + else if (!DefaultDataLayout.empty()) TD = new TargetData(DefaultDataLayout); if (TD) -- cgit v1.1