llvm.org GIT mirror llvm / 60d20a8
Revert "Recommit r179497 after fixing uninitialized variable." until I can fix the testcases here: http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/6952 This reverts commit r179512 due to testcases specifying triples that they didn't actually mean and causing failures on other platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179513 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
3 changed file(s) with 20 addition(s) and 16 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"
14
25 ; int foo(double *A, int n, int m) {
36 ; 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"
14
25 ;CHECK: @foo
36 ;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 }
533534
534535 // Package up features to be passed to target/subtarget
535536 std::string FeaturesStr;
596597 }
597598
598599 // If we are supposed to override the target triple, do so now.
599 const DataLayout *TD = 0;
600 if (!TargetTriple.empty()) {
600 if (!TargetTriple.empty())
601601 M->setTargetTriple(Triple::normalize(TargetTriple));
602 TD = GetTargetMachine(Triple(TargetTriple))->getDataLayout();
603 }
604602
605603 // Figure out what stream we are supposed to write to...
606604 OwningPtr Out;
642640 TLI->disableAllFunctions();
643641 Passes.add(TLI);
644642
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 }
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
653651 if (TD)
654 Passes.add(new DataLayout(*TD));
652 Passes.add(TD);
655653
656654 Triple ModuleTriple(M->getTargetTriple());
657655 TargetMachine *Machine = 0;