forked from OSchip/llvm-project
LoopVectorizer: Bail out if we don't have datalayout we need it
llvm-svn: 180195
This commit is contained in:
parent
b68c5f6bc3
commit
23a0589bce
|
@ -707,6 +707,11 @@ struct LoopVectorize : public LoopPass {
|
|||
AA = getAnalysisIfAvailable<AliasAnalysis>();
|
||||
TLI = getAnalysisIfAvailable<TargetLibraryInfo>();
|
||||
|
||||
if (DL == NULL) {
|
||||
DEBUG(dbgs() << "LV: Not vectorizing because of missing data layout");
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG(dbgs() << "LV: Checking a loop in \"" <<
|
||||
L->getHeader()->getParent()->getName() << "\"\n");
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
; RUN: opt -mtriple=x86_64-apple-darwin -mcpu=core2 -loop-vectorize -dce -instcombine -S < %s | FileCheck %s
|
||||
|
||||
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-n8:16:32:64-S128"
|
||||
|
||||
@B = common global [1024 x i32] zeroinitializer, align 16
|
||||
@A = common global [1024 x i32] zeroinitializer, align 16
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
; RUN: opt -S -loop-vectorize -dce -instcombine -force-vector-width=2 -force-vector-unroll=2 < %s | FileCheck %s
|
||||
|
||||
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-n8:16:32:64-S128"
|
||||
|
||||
;PR 15830.
|
||||
|
||||
;CHECK: foo
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
; RUN: opt -S -loop-vectorize -dce -instcombine -force-vector-width=2 -force-vector-unroll=1 < %s | FileCheck %s
|
||||
; RUN: opt -S -loop-vectorize -dce -instcombine -force-vector-width=2 -force-vector-unroll=1 < %s | FileCheck %s
|
||||
|
||||
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-n8:16:32:64-S128"
|
||||
|
||||
@A = common global [1024 x i32] zeroinitializer, align 16
|
||||
|
||||
; Signed tests.
|
||||
|
|
Loading…
Reference in New Issue