mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
llvm-svn: 85900
This commit is contained in:
parent
d524f94e95
commit
e711736014
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -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 ; <i16*> [#uses=2]
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 ; <i32*> [#uses=3]
|
||||
@B = global i32 8 ; <i32*> [#uses=2]
|
||||
|
@ -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] }
|
||||
|
@ -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:
|
||||
|
@ -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 {
|
||||
|
@ -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 ; <i32> [#uses=1]
|
||||
%B = load i32* %Y ; <i32> [#uses=1]
|
||||
|
@ -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 }
|
||||
|
@ -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 ; <i32*> [#uses=1]
|
||||
@G2 = constant i32* @G1 ; <i32**> [#uses=1]
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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 ; <i32*> [#uses=3]
|
||||
%V2 = bitcast i32* %V to i8* ; <i8*> [#uses=1]
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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 ; <i32> [#uses=1]
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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 ; <i32**> [#uses=3]
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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*)
|
||||
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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*)
|
||||
|
@ -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.
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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 ; <i32> [#uses=2]
|
||||
|
@ -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.
|
||||
|
@ -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*))
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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 }>
|
||||
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -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 ; <i32*> [#uses=3]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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* }
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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]
|
||||
|
@ -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 ; <float*> [#uses=2]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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<bool>
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user