llvm.org GIT mirror llvm / fdf9624
Recommit r179497 after fixing uninitialized variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179512 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
3 changed file(s) with 16 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=i386-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
1
2 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:128:128-n8:16:32-S128"
3 target triple = "i386-apple-macosx10.8.0"
41
52 ; int foo(double *A, int n, int m) {
63 ; double sum = 0, v1 = 2, v0 = 3;
0 ; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=i386-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
1
2 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:128:128-n8:16:32-S128"
3 target triple = "i386-apple-macosx10.8.0"
41
52 ;CHECK: @foo
63 ;CHECK: load <2 x double>
402402 AU.setPreservesAll();
403403 }
404404 };
405
405
406406 } // anonymous namespace
407407
408408 char BreakpointPrinter::ID = 0;
445445 Builder.DisableUnitAtATime = !UnitAtATime;
446446 Builder.DisableUnrollLoops = OptLevel == 0;
447447 Builder.DisableSimplifyLibCalls = DisableSimplifyLibCalls;
448
448
449449 Builder.populateFunctionPassManager(FPM);
450450 Builder.populateModulePassManager(MPM);
451451 }
528528 const Target *TheTarget = TargetRegistry::lookupTarget(MArch, TheTriple,
529529 Error);
530530 // Some modules don't specify a triple, and this is okay.
531 if (!TheTarget) {
531 if (!TheTarget)
532532 return 0;
533 }
534533
535534 // Package up features to be passed to target/subtarget
536535 std::string FeaturesStr;
597596 }
598597
599598 // If we are supposed to override the target triple, do so now.
600 if (!TargetTriple.empty())
599 const DataLayout *TD = 0;
600 if (!TargetTriple.empty()) {
601601 M->setTargetTriple(Triple::normalize(TargetTriple));
602 TD = GetTargetMachine(Triple(TargetTriple))->getDataLayout();
603 }
602604
603605 // Figure out what stream we are supposed to write to...
604606 OwningPtr Out;
640642 TLI->disableAllFunctions();
641643 Passes.add(TLI);
642644
643 // Add an appropriate DataLayout instance for this module.
644 DataLayout *TD = 0;
645 const std::string &ModuleDataLayout = M.get()->getDataLayout();
646 if (!ModuleDataLayout.empty())
647 TD = new DataLayout(ModuleDataLayout);
648 else if (!DefaultDataLayout.empty())
649 TD = new DataLayout(DefaultDataLayout);
650
645 // If we don't have a data layout by now go ahead and set it if we can.
646 if (!TD) {
647 const std::string &ModuleDataLayout = M.get()->getDataLayout();
648 if (!ModuleDataLayout.empty())
649 TD = new DataLayout(ModuleDataLayout);
650 else if (!DefaultDataLayout.empty())
651 TD = new DataLayout(DefaultDataLayout);
652 }
651653 if (TD)
652 Passes.add(TD);
654 Passes.add(new DataLayout(*TD));
653655
654656 Triple ModuleTriple(M->getTargetTriple());
655657 TargetMachine *Machine = 0;