Index: test/CodeGen/PowerPC/vector.ll =================================================================== --- test/CodeGen/PowerPC/vector.ll +++ test/CodeGen/PowerPC/vector.ll @@ -1,6 +1,6 @@ ; Test that vectors are scalarized/lowered correctly. -; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 > %t -; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g3 >> %t +; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 > %t +; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g3 >> %t %d8 = type <8 x double> %f1 = type <1 x float> Index: tools/llc/llc.cpp =================================================================== --- tools/llc/llc.cpp +++ tools/llc/llc.cpp @@ -413,6 +413,9 @@ bool SkipModule = MCPU == "help" || (!MAttrs.empty() && MAttrs.front() == "help"); + if (TargetTriple == "default") + TargetTriple = sys::getDefaultTargetTriple(); + // If user just wants to list available options, skip module loading if (!SkipModule) { if (InputLanguage == "mir" || @@ -443,8 +446,11 @@ TheTriple = Triple(Triple::normalize(TargetTriple)); } - if (TheTriple.getTriple().empty()) - TheTriple.setTriple(sys::getDefaultTargetTriple()); + if (TheTriple.getTriple().empty()) { + errs() << argv[0] << ": No target triple specified.\n"; + errs() << "Note: You may specify -mtriple=default for the default.\n"; + return 1; + } // Get the target specific parser. std::string Error;