Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -255,19 +255,18 @@ PM.add(createEfficiencySanitizerPass(Opts)); } -static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple, +static TargetLibraryInfoImpl *createTLII(llvm::Module &M, const CodeGenOptions &CodeGenOpts) { - TargetLibraryInfoImpl *TLII = new TargetLibraryInfoImpl(TargetTriple); - if (!CodeGenOpts.SimplifyLibCalls) - TLII->disableAllFunctions(); - else { - // Disable individual libc/libm calls in TargetLibraryInfo. - LibFunc::Func F; - for (auto &FuncName : CodeGenOpts.getNoBuiltinFuncs()) - if (TLII->getLibFunc(FuncName, F)) - TLII->setUnavailable(F); - } + TargetLibraryInfoImpl *TLII = new TargetLibraryInfoImpl(M); + + // Disable individual libc/libm calls in TargetLibraryInfo. + // FIXME: Consider removing (see PR30403). + LibFunc::Func F; + for (auto &FuncName : CodeGenOpts.getNoBuiltinFuncs()) + if (TLII->getLibFunc(FuncName, F)) + TLII->setUnavailable(F); + // FIXME: Move these to module flags. switch (CodeGenOpts.getVecLib()) { case CodeGenOptions::Accelerate: TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::Accelerate); @@ -307,7 +306,7 @@ // TLI with an unknown target otherwise. Triple TargetTriple(TheModule->getTargetTriple()); std::unique_ptr TLII( - createTLII(TargetTriple, CodeGenOpts)); + createTLII(*TheModule, CodeGenOpts)); // At O0 and O1 we only run the always inliner which is more efficient. At // higher optimization levels we run the normal inliner. @@ -625,7 +624,7 @@ // Add LibraryInfo. llvm::Triple TargetTriple(TheModule->getTargetTriple()); std::unique_ptr TLII( - createTLII(TargetTriple, CodeGenOpts)); + createTLII(*TheModule, CodeGenOpts)); CodeGenPasses.add(new TargetLibraryInfoWrapperPass(*TLII)); // Normal mode, emit a .s or .o file by running the code generator. Note, Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -486,6 +486,9 @@ getModule().setPIELevel(static_cast(PLevel)); } + if (CodeGenOpts.SimplifyLibCalls) + getModule().addModuleFlag(llvm::Module::Override, "hosted", 1); + SimplifyPersonality(); if (getCodeGenOpts().EmitDeclMetadata) Index: clang/test/CodeGen/nobuiltin.c =================================================================== --- clang/test/CodeGen/nobuiltin.c +++ clang/test/CodeGen/nobuiltin.c @@ -19,3 +19,8 @@ for (unsigned i = 0; i < 8192; ++i) s[i] = 0; } + +// IR1: !llvm.module.flags = !{!0} +// IR1: !0 = !{i32 4, !"hosted", i32 1} + +// IR2-NOT: "hosted" Index: clang/test/CodeGenCUDA/flush-denormals.cu =================================================================== --- clang/test/CodeGenCUDA/flush-denormals.cu +++ clang/test/CodeGenCUDA/flush-denormals.cu @@ -18,8 +18,8 @@ // FTZ: attributes #0 = {{.*}} "nvptx-f32ftz"="true" // NOFTZ-NOT: attributes #0 = {{.*}} "nvptx-f32ftz" -// FTZ:!llvm.module.flags = !{[[MODFLAG:![0-9]+]]} +// FTZ:!llvm.module.flags = !{[[MODFLAG:![0-9]+]] // FTZ:[[MODFLAG]] = !{i32 4, !"nvvm-reflect-ftz", i32 1} -// NOFTZ:!llvm.module.flags = !{[[MODFLAG:![0-9]+]]} +// NOFTZ:!llvm.module.flags = !{[[MODFLAG:![0-9]+]] // NOFTZ:[[MODFLAG]] = !{i32 4, !"nvvm-reflect-ftz", i32 0} Index: clang/test/CodeGenCXX/strict-vtable-pointers.cpp =================================================================== --- clang/test/CodeGenCXX/strict-vtable-pointers.cpp +++ clang/test/CodeGenCXX/strict-vtable-pointers.cpp @@ -211,7 +211,7 @@ // CHECK-DTORS-LABEL: {{^}}} -// CHECK-LINK-REQ: !llvm.module.flags = !{![[FIRST:.*]], ![[SEC:.*]]{{.*}}} +// CHECK-LINK-REQ: !llvm.module.flags = !{![[FIRST:[0-9]*]], ![[SEC:[0-9]*]]{{.*}}} // CHECK-LINK-REQ: ![[FIRST]] = !{i32 1, !"StrictVTablePointers", i32 1} // CHECK-LINK-REQ: ![[SEC]] = !{i32 3, !"StrictVTablePointersRequirement", ![[META:.*]]} Index: lld/test/ELF/lto/undefined-puts.ll =================================================================== --- lld/test/ELF/lto/undefined-puts.ll +++ lld/test/ELF/lto/undefined-puts.ll @@ -26,3 +26,6 @@ ; CHECK: DynamicSymbols [ ; CHECK: Symbol { ; CHECK: Name: puts@ + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/include/llvm/Analysis/TargetLibraryInfo.h =================================================================== --- llvm/include/llvm/Analysis/TargetLibraryInfo.h +++ llvm/include/llvm/Analysis/TargetLibraryInfo.h @@ -92,7 +92,7 @@ }; TargetLibraryInfoImpl(); - explicit TargetLibraryInfoImpl(const Triple &T); + explicit TargetLibraryInfoImpl(const Module &M); // Provide value semantics. TargetLibraryInfoImpl(const TargetLibraryInfoImpl &TLI); @@ -353,9 +353,9 @@ Optional PresetInfoImpl; - StringMap> Impls; + DenseMap> Impls; - TargetLibraryInfoImpl &lookupInfoImpl(const Triple &T); + TargetLibraryInfoImpl &lookupInfoImpl(const Module &M); }; class TargetLibraryInfoWrapperPass : public ImmutablePass { @@ -367,7 +367,7 @@ public: static char ID; TargetLibraryInfoWrapperPass(); - explicit TargetLibraryInfoWrapperPass(const Triple &T); + explicit TargetLibraryInfoWrapperPass(const Module &M); explicit TargetLibraryInfoWrapperPass(const TargetLibraryInfoImpl &TLI); TargetLibraryInfo &getTLI() { return TLI; } Index: llvm/lib/Analysis/TargetLibraryInfo.cpp =================================================================== --- llvm/lib/Analysis/TargetLibraryInfo.cpp +++ llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -442,11 +442,17 @@ initialize(*this, Triple(), StandardNames); } -TargetLibraryInfoImpl::TargetLibraryInfoImpl(const Triple &T) { +TargetLibraryInfoImpl::TargetLibraryInfoImpl(const Module &M) { // Default to everything being available. memset(AvailableArray, -1, sizeof(AvailableArray)); - initialize(*this, T, StandardNames); + // Freestanding modules have no functions available. + if (!M.getModuleFlag("hosted")) { + disableAllFunctions(); + return; + } + + initialize(*this, Triple(M.getTargetTriple()), StandardNames); } TargetLibraryInfoImpl::TargetLibraryInfoImpl(const TargetLibraryInfoImpl &TLI) @@ -1227,7 +1233,7 @@ if (PresetInfoImpl) return TargetLibraryInfo(*PresetInfoImpl); - return TargetLibraryInfo(lookupInfoImpl(Triple(M.getTargetTriple()))); + return TargetLibraryInfo(lookupInfoImpl(M)); } TargetLibraryInfo TargetLibraryAnalysis::run(Function &F, @@ -1235,15 +1241,13 @@ if (PresetInfoImpl) return TargetLibraryInfo(*PresetInfoImpl); - return TargetLibraryInfo( - lookupInfoImpl(Triple(F.getParent()->getTargetTriple()))); + return TargetLibraryInfo(lookupInfoImpl(*F.getParent())); } -TargetLibraryInfoImpl &TargetLibraryAnalysis::lookupInfoImpl(const Triple &T) { - std::unique_ptr &Impl = - Impls[T.normalize()]; +TargetLibraryInfoImpl &TargetLibraryAnalysis::lookupInfoImpl(const Module &M) { + std::unique_ptr &Impl = Impls[&M]; if (!Impl) - Impl.reset(new TargetLibraryInfoImpl(T)); + Impl.reset(new TargetLibraryInfoImpl(M)); return *Impl; } @@ -1254,8 +1258,8 @@ initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry()); } -TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(const Triple &T) - : ImmutablePass(ID), TLIImpl(T), TLI(TLIImpl) { +TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(const Module &M) + : ImmutablePass(ID), TLIImpl(M), TLI(TLIImpl) { initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry()); } Index: llvm/lib/LTO/LTOBackend.cpp =================================================================== --- llvm/lib/LTO/LTOBackend.cpp +++ llvm/lib/LTO/LTOBackend.cpp @@ -173,7 +173,7 @@ passes.add(createTargetTransformInfoWrapperPass(TM->getTargetIRAnalysis())); PassManagerBuilder PMB; - PMB.LibraryInfo = new TargetLibraryInfoImpl(Triple(TM->getTargetTriple())); + PMB.LibraryInfo = new TargetLibraryInfoImpl(Mod); PMB.Inliner = createFunctionInliningPass(); // Unconditionally verify input since it is not verified before this // point and has unknown origin. Index: llvm/lib/LTO/LTOCodeGenerator.cpp =================================================================== --- llvm/lib/LTO/LTOCodeGenerator.cpp +++ llvm/lib/LTO/LTOCodeGenerator.cpp @@ -566,7 +566,7 @@ PMB.SLPVectorize = !DisableVectorization; if (!DisableInline) PMB.Inliner = createFunctionInliningPass(); - PMB.LibraryInfo = new TargetLibraryInfoImpl(TargetTriple); + PMB.LibraryInfo = new TargetLibraryInfoImpl(*MergedModule); PMB.OptLevel = OptLevel; PMB.VerifyInput = !DisableVerify; PMB.VerifyOutput = !DisableVerify; Index: llvm/lib/LTO/ThinLTOCodeGenerator.cpp =================================================================== --- llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -204,7 +204,7 @@ unsigned OptLevel) { // Populate the PassManager PassManagerBuilder PMB; - PMB.LibraryInfo = new TargetLibraryInfoImpl(TM.getTargetTriple()); + PMB.LibraryInfo = new TargetLibraryInfoImpl(TheModule); PMB.Inliner = createFunctionInliningPass(); // FIXME: should get it from the bitcode? PMB.OptLevel = OptLevel; Index: llvm/lib/LTO/UpdateCompilerUsed.cpp =================================================================== --- llvm/lib/LTO/UpdateCompilerUsed.cpp +++ llvm/lib/LTO/UpdateCompilerUsed.cpp @@ -58,7 +58,7 @@ // same names are added to llvm.compiler.used to prevent them from being // deleted by optimizations. void initializeLibCalls(const Module &TheModule) { - TargetLibraryInfoImpl TLII(Triple(TM.getTargetTriple())); + TargetLibraryInfoImpl TLII(TheModule); TargetLibraryInfo TLI(TLII); // TargetLibraryInfo has info on C runtime library calls on the current Index: llvm/test/Analysis/GlobalsModRef/indirect-global.ll =================================================================== --- llvm/test/Analysis/GlobalsModRef/indirect-global.ll +++ llvm/test/Analysis/GlobalsModRef/indirect-global.ll @@ -24,3 +24,6 @@ %X = sub i32 %h1, %h2 ; [#uses=1] ret i32 %X } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Analysis/GlobalsModRef/memset-escape.ll =================================================================== --- llvm/test/Analysis/GlobalsModRef/memset-escape.ll +++ llvm/test/Analysis/GlobalsModRef/memset-escape.ll @@ -63,3 +63,6 @@ ; Function Attrs: noreturn nounwind declare void @abort() noreturn nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll =================================================================== --- llvm/test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll +++ llvm/test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll @@ -6,7 +6,7 @@ ; it has a TBAA tag which declares that it is unrelated. ; CHECK: @foo -; CHECK-NEXT: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %p, i8* %q, i64 16, i32 1, i1 false), !tbaa !0 +; CHECK-NEXT: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %p, i8* %q, i64 16, i32 1, i1 false), !tbaa !1 ; CHECK-NEXT: store i8 2, i8* %s, align 1, !tbaa [[TAGA:!.*]] ; CHECK-NEXT: ret void define void @foo(i8* nocapture %p, i8* nocapture %q, i8* nocapture %s) nounwind { @@ -25,3 +25,6 @@ !2 = !{!4, !4, i64 0} !3 = !{!"A", !0} !4 = !{!"B", !0} + +!llvm.module.flags = !{!5} +!5 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AArch64/arm64-fcopysign.ll =================================================================== --- llvm/test/CodeGen/AArch64/arm64-fcopysign.ll +++ llvm/test/CodeGen/AArch64/arm64-fcopysign.ll @@ -49,3 +49,6 @@ declare double @bar(...) declare double @copysign(double, double) nounwind readnone declare float @copysignf(float, float) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AArch64/arm64-rounding.ll =================================================================== --- llvm/test/CodeGen/AArch64/arm64-rounding.ll +++ llvm/test/CodeGen/AArch64/arm64-rounding.ll @@ -202,3 +202,6 @@ attributes #0 = { nounwind } attributes #1 = { nounwind "unsafe-fp-math"="true" } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AArch64/arm64-sincos.ll =================================================================== --- llvm/test/CodeGen/AArch64/arm64-sincos.ll +++ llvm/test/CodeGen/AArch64/arm64-sincos.ll @@ -40,3 +40,6 @@ declare double @sin(double) readonly declare float @cosf(float) readonly declare double @cos(double) readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AArch64/floatdp_1source.ll =================================================================== --- llvm/test/CodeGen/AArch64/floatdp_1source.ll +++ llvm/test/CodeGen/AArch64/floatdp_1source.ll @@ -136,3 +136,6 @@ ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AArch64/round-conv.ll =================================================================== --- llvm/test/CodeGen/AArch64/round-conv.ll +++ llvm/test/CodeGen/AArch64/round-conv.ll @@ -328,3 +328,6 @@ declare double @trunc(double) nounwind readnone declare float @roundf(float) nounwind readnone declare double @round(double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/complex-folding.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/complex-folding.ll +++ llvm/test/CodeGen/AMDGPU/complex-folding.ll @@ -15,3 +15,6 @@ declare float @fabs(float ) readnone declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/fabs.f64.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/fabs.f64.ll +++ llvm/test/CodeGen/AMDGPU/fabs.f64.ll @@ -95,3 +95,6 @@ store double %fabs, double addrspace(1)* %out ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/fabs.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/fabs.ll +++ llvm/test/CodeGen/AMDGPU/fabs.ll @@ -99,3 +99,6 @@ declare float @llvm.fabs.f32(float) readnone declare <2 x float> @llvm.fabs.v2f32(<2 x float>) readnone declare <4 x float> @llvm.fabs.v4f32(<4 x float>) readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/floor.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/floor.ll +++ llvm/test/CodeGen/AMDGPU/floor.ll @@ -12,3 +12,6 @@ declare float @floor(float) readonly declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/fneg-fabs.f64.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/fneg-fabs.f64.ll +++ llvm/test/CodeGen/AMDGPU/fneg-fabs.f64.ll @@ -99,3 +99,6 @@ declare double @llvm.fabs.f64(double) readnone declare <2 x double> @llvm.fabs.v2f64(<2 x double>) readnone declare <4 x double> @llvm.fabs.v4f64(<4 x double>) readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/fneg-fabs.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/fneg-fabs.ll +++ llvm/test/CodeGen/AMDGPU/fneg-fabs.ll @@ -110,3 +110,6 @@ declare float @llvm.fabs.f32(float) readnone declare <2 x float> @llvm.fabs.v2f32(<2 x float>) readnone declare <4 x float> @llvm.fabs.v4f32(<4 x float>) readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/llvm.SI.fs.interp.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/llvm.SI.fs.interp.ll +++ llvm/test/CodeGen/AMDGPU/llvm.SI.fs.interp.ll @@ -57,3 +57,6 @@ attributes #0 = { nounwind readnone } attributes #1 = { readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll +++ llvm/test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll @@ -56,3 +56,6 @@ declare <4 x float> @llvm.r600.texc(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0 attributes #0 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/AMDGPU/schedule-if-2.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/schedule-if-2.ll +++ llvm/test/CodeGen/AMDGPU/schedule-if-2.ll @@ -92,3 +92,6 @@ declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) attributes #0 = { readonly } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/apcs-vfp.ll =================================================================== --- llvm/test/CodeGen/ARM/apcs-vfp.ll +++ llvm/test/CodeGen/ARM/apcs-vfp.ll @@ -151,3 +151,6 @@ attributes #0 = { readnone } attributes #1 = { readonly } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/arm32-round-conv.ll =================================================================== --- llvm/test/CodeGen/ARM/arm32-round-conv.ll +++ llvm/test/CodeGen/ARM/arm32-round-conv.ll @@ -115,3 +115,6 @@ declare double @ceil(double) nounwind readnone declare float @roundf(float) nounwind readnone declare double @round(double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/arm32-rounding.ll =================================================================== --- llvm/test/CodeGen/ARM/arm32-rounding.ll +++ llvm/test/CodeGen/ARM/arm32-rounding.ll @@ -116,3 +116,6 @@ declare double @nearbyint(double) nounwind readnone declare float @rintf(float) nounwind readnone declare double @rint(double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/fabs-to-bfc.ll =================================================================== --- llvm/test/CodeGen/ARM/fabs-to-bfc.ll +++ llvm/test/CodeGen/ARM/fabs-to-bfc.ll @@ -12,3 +12,6 @@ declare double @fabs(double) readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/fabss.ll =================================================================== --- llvm/test/CodeGen/ARM/fabss.ll +++ llvm/test/CodeGen/ARM/fabss.ll @@ -27,3 +27,6 @@ ; CORTEXA9-LABEL: test: ; CORTEXA9: vabs.f32 s{{.}}, s{{.}} + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/fcopysign.ll =================================================================== --- llvm/test/CodeGen/ARM/fcopysign.ll +++ llvm/test/CodeGen/ARM/fcopysign.ll @@ -58,3 +58,6 @@ declare double @bar(...) declare double @copysign(double, double) nounwind declare float @copysignf(float, float) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/floorf.ll =================================================================== --- llvm/test/CodeGen/ARM/floorf.ll +++ llvm/test/CodeGen/ARM/floorf.ll @@ -27,3 +27,6 @@ + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/fparith.ll =================================================================== --- llvm/test/CodeGen/ARM/fparith.ll +++ llvm/test/CodeGen/ARM/fparith.ll @@ -99,3 +99,6 @@ } declare double @fabs(double) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/ifcvt10.ll =================================================================== --- llvm/test/CodeGen/ARM/ifcvt10.ll +++ llvm/test/CodeGen/ARM/ifcvt10.ll @@ -41,3 +41,6 @@ declare double @fabs(double) declare double @llvm.pow.f64(double, double) nounwind readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/sincos.ll =================================================================== --- llvm/test/CodeGen/ARM/sincos.ll +++ llvm/test/CodeGen/ARM/sincos.ll @@ -54,3 +54,6 @@ declare double @sin(double) readonly declare float @cosf(float) readonly declare double @cos(double) readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/v7k-libcalls.ll =================================================================== --- llvm/test/CodeGen/ARM/v7k-libcalls.ll +++ llvm/test/CodeGen/ARM/v7k-libcalls.ll @@ -161,3 +161,6 @@ attributes #0 = { readnone } attributes #1 = { readonly } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/v7k-sincos.ll =================================================================== --- llvm/test/CodeGen/ARM/v7k-sincos.ll +++ llvm/test/CodeGen/ARM/v7k-sincos.ll @@ -14,3 +14,6 @@ %sum = fadd double %sin, %cos ret double %sum } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/ARM/vfp.ll =================================================================== --- llvm/test/CodeGen/ARM/vfp.ll +++ llvm/test/CodeGen/ARM/vfp.ll @@ -154,3 +154,6 @@ %tmp1 = tail call i32 (...) @baz( ) ; [#uses=0] ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Hexagon/fminmax.ll =================================================================== --- llvm/test/CodeGen/Hexagon/fminmax.ll +++ llvm/test/CodeGen/Hexagon/fminmax.ll @@ -25,3 +25,6 @@ attributes #0 = { nounwind readnone "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv60" "target-features"="+hvx,-hvx-double" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Hexagon/opt-fabs.ll =================================================================== --- llvm/test/CodeGen/Hexagon/opt-fabs.ll +++ llvm/test/CodeGen/Hexagon/opt-fabs.ll @@ -13,3 +13,6 @@ } declare float @fabsf(float) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/f16abs.ll =================================================================== --- llvm/test/CodeGen/Mips/f16abs.ll +++ llvm/test/CodeGen/Mips/f16abs.ll @@ -35,3 +35,6 @@ + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/fabs.ll =================================================================== --- llvm/test/CodeGen/Mips/fabs.ll +++ llvm/test/CodeGen/Mips/fabs.ll @@ -36,3 +36,6 @@ } declare double @fabs(double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/fcopysign-f32-f64.ll =================================================================== --- llvm/test/CodeGen/Mips/fcopysign-f32-f64.ll +++ llvm/test/CodeGen/Mips/fcopysign-f32-f64.ll @@ -56,3 +56,6 @@ %call = tail call double @copysign(double %add, double %conv) nounwind readnone ret double %call } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/fcopysign.ll =================================================================== --- llvm/test/CodeGen/Mips/fcopysign.ll +++ llvm/test/CodeGen/Mips/fcopysign.ll @@ -58,3 +58,6 @@ declare float @copysignf(float, float) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll =================================================================== --- llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll +++ llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll @@ -11,3 +11,6 @@ declare float @sqrtf(float) ; CHECK: sqrt.s $f0, $f12 + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/mips64-f128.ll =================================================================== --- llvm/test/CodeGen/Mips/mips64-f128.ll +++ llvm/test/CodeGen/Mips/mips64-f128.ll @@ -675,3 +675,6 @@ %cond = select i1 %cmp, fp128 %c, fp128 %d ret fp128 %cond } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/Mips/optimize-fp-math.ll =================================================================== --- llvm/test/CodeGen/Mips/optimize-fp-math.ll +++ llvm/test/CodeGen/Mips/optimize-fp-math.ll @@ -31,3 +31,6 @@ } declare double @sqrt(double) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/PowerPC/copysignl.ll =================================================================== --- llvm/test/CodeGen/PowerPC/copysignl.ll +++ llvm/test/CodeGen/PowerPC/copysignl.ll @@ -81,3 +81,6 @@ attributes #0 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/PowerPC/fabs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/fabs.ll +++ llvm/test/CodeGen/PowerPC/fabs.ll @@ -28,3 +28,6 @@ ret float %bc2 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/PowerPC/fcpsgn.ll =================================================================== --- llvm/test/CodeGen/PowerPC/fcpsgn.ll +++ llvm/test/CodeGen/PowerPC/fcpsgn.ll @@ -63,3 +63,6 @@ attributes #0 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/PowerPC/fnabs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/fnabs.ll +++ llvm/test/CodeGen/PowerPC/fnabs.ll @@ -8,3 +8,6 @@ ret double %Z } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/PowerPC/rounding-ops.ll =================================================================== --- llvm/test/CodeGen/PowerPC/rounding-ops.ll +++ llvm/test/CodeGen/PowerPC/rounding-ops.ll @@ -99,3 +99,6 @@ declare double @trunc(double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/PowerPC/vsx-elementary-arith.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vsx-elementary-arith.ll +++ llvm/test/CodeGen/PowerPC/vsx-elementary-arith.ll @@ -149,3 +149,6 @@ ; Function Attrs: nounwind readnone declare <2 x double> @llvm.ppc.vsx.xvrsqrtedp(<2 x double>) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SPARC/64abi.ll =================================================================== --- llvm/test/CodeGen/SPARC/64abi.ll +++ llvm/test/CodeGen/SPARC/64abi.ll @@ -543,3 +543,6 @@ declare inreg float @cosf(float %arg) readnone nounwind declare inreg float @sinf(float %arg) readnone nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/fp-copysign-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/fp-copysign-01.ll +++ llvm/test/CodeGen/SystemZ/fp-copysign-01.ll @@ -126,3 +126,6 @@ store fp128 %c, fp128 *%cptr ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/fp-sincos-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/fp-sincos-01.ll +++ llvm/test/CodeGen/SystemZ/fp-sincos-01.ll @@ -54,3 +54,6 @@ declare double @cos(double) readonly declare fp128 @cosl(fp128) readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/fp-sqrt-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/fp-sqrt-01.ll +++ llvm/test/CodeGen/SystemZ/fp-sqrt-01.ll @@ -165,3 +165,6 @@ %res = tail call float @sqrtf(float %val) ret float %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/fp-sqrt-02.ll =================================================================== --- llvm/test/CodeGen/SystemZ/fp-sqrt-02.ll +++ llvm/test/CodeGen/SystemZ/fp-sqrt-02.ll @@ -167,3 +167,6 @@ %res = tail call double @sqrt(double %val) ret double %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/memchr-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/memchr-01.ll +++ llvm/test/CodeGen/SystemZ/memchr-01.ll @@ -19,3 +19,6 @@ %res = call i8 *@memchr(i8 *%src, i16 %char, i32 %len) ret i8 *%res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/memchr-02.ll =================================================================== --- llvm/test/CodeGen/SystemZ/memchr-02.ll +++ llvm/test/CodeGen/SystemZ/memchr-02.ll @@ -55,3 +55,6 @@ %res2 = call i8 *@memchr(i8 *%res1, i32 %charext, i64 %len) ret i8 *%res2 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/memcmp-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/memcmp-01.ll +++ llvm/test/CodeGen/SystemZ/memcmp-01.ll @@ -219,3 +219,6 @@ %res = call i32 @memcmp(i8 *%src1, i8 *%src2, i64 769) ret i32 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/memcmp-02.ll =================================================================== --- llvm/test/CodeGen/SystemZ/memcmp-02.ll +++ llvm/test/CodeGen/SystemZ/memcmp-02.ll @@ -137,3 +137,6 @@ %res = call i64 @memcmp(i8 *%src1, i8 *%src2, i64 257) ret i64 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/strcmp-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/strcmp-01.ll +++ llvm/test/CodeGen/SystemZ/strcmp-01.ll @@ -68,3 +68,6 @@ exit: ret i32 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/strcmp-02.ll =================================================================== --- llvm/test/CodeGen/SystemZ/strcmp-02.ll +++ llvm/test/CodeGen/SystemZ/strcmp-02.ll @@ -70,3 +70,6 @@ exit: ret i64 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/strcpy-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/strcpy-01.ll +++ llvm/test/CodeGen/SystemZ/strcpy-01.ll @@ -48,3 +48,6 @@ store i32 0, i32 *%storeptr ret i32 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/strlen-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/strlen-01.ll +++ llvm/test/CodeGen/SystemZ/strlen-01.ll @@ -37,3 +37,6 @@ %res = call i64 @strnlen(i8 *%src, i64 %len) ret i64 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/SystemZ/strlen-02.ll =================================================================== --- llvm/test/CodeGen/SystemZ/strlen-02.ll +++ llvm/test/CodeGen/SystemZ/strlen-02.ll @@ -37,3 +37,6 @@ %res = call i32 @strnlen(i8 *%src, i32 %len) ret i32 %res } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/avx512-arith.ll =================================================================== --- llvm/test/CodeGen/X86/avx512-arith.ll +++ llvm/test/CodeGen/X86/avx512-arith.ll @@ -1086,3 +1086,6 @@ ret <16 x float> %t } declare <16 x float> @llvm.fabs.v16f32(<16 x float> %p) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fabs.ll =================================================================== --- llvm/test/CodeGen/X86/fabs.ll +++ llvm/test/CodeGen/X86/fabs.ll @@ -52,3 +52,6 @@ ; CHECK-NOT: fabs ; UNSAFE-NOT: fabs ; NOOPT-NOT: fabs + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fmaxnum.ll =================================================================== --- llvm/test/CodeGen/X86/fmaxnum.ll +++ llvm/test/CodeGen/X86/fmaxnum.ll @@ -237,3 +237,6 @@ ret <8 x double> %z } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fminnum.ll =================================================================== --- llvm/test/CodeGen/X86/fminnum.ll +++ llvm/test/CodeGen/X86/fminnum.ll @@ -228,3 +228,6 @@ %z = call <8 x double> @llvm.minnum.v8f64(<8 x double> %x, <8 x double> %y) readnone ret <8 x double> %z } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fnabs.ll =================================================================== --- llvm/test/CodeGen/X86/fnabs.ll +++ llvm/test/CodeGen/X86/fnabs.ll @@ -75,3 +75,6 @@ attributes #1 = { readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fp-in-intregs.ll =================================================================== --- llvm/test/CodeGen/X86/fp-in-intregs.ll +++ llvm/test/CodeGen/X86/fp-in-intregs.ll @@ -20,3 +20,6 @@ declare float @copysignf(float, float) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fp128-cast.ll =================================================================== --- llvm/test/CodeGen/X86/fp128-cast.ll +++ llvm/test/CodeGen/X86/fp128-cast.ll @@ -362,3 +362,6 @@ declare double @copysign(double, double) #1 attributes #2 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/fp128-i128.ll =================================================================== --- llvm/test/CodeGen/X86/fp128-i128.ll +++ llvm/test/CodeGen/X86/fp128-i128.ll @@ -318,3 +318,6 @@ attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+ssse3,+sse3,+popcnt,+sse,+sse2,+sse4.1,+sse4.2" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+ssse3,+sse3,+popcnt,+sse,+sse2,+sse4.1,+sse4.2" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #2 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/memcmp.ll =================================================================== --- llvm/test/CodeGen/X86/memcmp.ll +++ llvm/test/CodeGen/X86/memcmp.ll @@ -128,3 +128,6 @@ ; CHECK: cmpq } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/mempcpy.ll =================================================================== --- llvm/test/CodeGen/X86/mempcpy.ll +++ llvm/test/CodeGen/X86/mempcpy.ll @@ -26,3 +26,6 @@ } declare i8* @mempcpy(i8*, i8*, i64) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/pr13577.ll =================================================================== --- llvm/test/CodeGen/X86/pr13577.ll +++ llvm/test/CodeGen/X86/pr13577.ll @@ -41,3 +41,6 @@ declare float @copysignf(float, float) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/pr2656.ll =================================================================== --- llvm/test/CodeGen/X86/pr2656.ll +++ llvm/test/CodeGen/X86/pr2656.ll @@ -50,3 +50,6 @@ declare double @fabs(double) #0 attributes #0 = { readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/pr26625.ll =================================================================== --- llvm/test/CodeGen/X86/pr26625.ll +++ llvm/test/CodeGen/X86/pr26625.ll @@ -18,3 +18,6 @@ attributes #0 = { nounwind optsize readnone } attributes #1 = { nounwind optsize readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/rounding-ops.ll =================================================================== --- llvm/test/CodeGen/X86/rounding-ops.ll +++ llvm/test/CodeGen/X86/rounding-ops.ll @@ -130,3 +130,6 @@ } declare double @trunc(double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/sincos-opt.ll =================================================================== --- llvm/test/CodeGen/X86/sincos-opt.ll +++ llvm/test/CodeGen/X86/sincos-opt.ll @@ -96,3 +96,6 @@ declare x86_fp80 @sinl(x86_fp80) declare x86_fp80 @cosl(x86_fp80) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/sincos.ll =================================================================== --- llvm/test/CodeGen/X86/sincos.ll +++ llvm/test/CodeGen/X86/sincos.ll @@ -77,3 +77,6 @@ ; SIN-NOT: fsin ; COS-NOT: fcos + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/CodeGen/X86/stack-align.ll =================================================================== --- llvm/test/CodeGen/X86/stack-align.ll +++ llvm/test/CodeGen/X86/stack-align.ll @@ -89,3 +89,6 @@ declare void @llvm.lifetime.end(i64, i8* nocapture) argmemonly nounwind attributes #0 = { nounwind alignstack=16 "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Instrumentation/AddressSanitizer/str-nobuiltin.ll =================================================================== --- llvm/test/Instrumentation/AddressSanitizer/str-nobuiltin.ll +++ llvm/test/Instrumentation/AddressSanitizer/str-nobuiltin.ll @@ -31,3 +31,6 @@ tail call i64 @strnlen(i8* %a, i64 12) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Instrumentation/BoundsChecking/simple.ll =================================================================== --- llvm/test/Instrumentation/BoundsChecking/simple.ll +++ llvm/test/Instrumentation/BoundsChecking/simple.ll @@ -165,3 +165,6 @@ alive: ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Instrumentation/EfficiencySanitizer/str-nobuiltin.ll =================================================================== --- llvm/test/Instrumentation/EfficiencySanitizer/str-nobuiltin.ll +++ llvm/test/Instrumentation/EfficiencySanitizer/str-nobuiltin.ll @@ -31,3 +31,6 @@ tail call i64 @strnlen(i8* %a, i64 12) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Instrumentation/MemorySanitizer/str-nobuiltin.ll =================================================================== --- llvm/test/Instrumentation/MemorySanitizer/str-nobuiltin.ll +++ llvm/test/Instrumentation/MemorySanitizer/str-nobuiltin.ll @@ -31,3 +31,6 @@ tail call i64 @strnlen(i8* %a, i64 12) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Instrumentation/ThreadSanitizer/str-nobuiltin.ll =================================================================== --- llvm/test/Instrumentation/ThreadSanitizer/str-nobuiltin.ll +++ llvm/test/Instrumentation/ThreadSanitizer/str-nobuiltin.ll @@ -31,3 +31,6 @@ tail call i64 @strnlen(i8* %a, i64 12) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/LTO/X86/runtime-library.ll =================================================================== --- llvm/test/LTO/X86/runtime-library.ll +++ llvm/test/LTO/X86/runtime-library.ll @@ -25,3 +25,6 @@ ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/LTO/X86/triple-init.ll =================================================================== --- llvm/test/LTO/X86/triple-init.ll +++ llvm/test/LTO/X86/triple-init.ll @@ -13,3 +13,6 @@ %retval = call double @pow(double 10.0, double %x) ret double %retval } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/ConstProp/calls.ll =================================================================== --- llvm/test/Transforms/ConstProp/calls.ll +++ llvm/test/Transforms/ConstProp/calls.ll @@ -400,3 +400,6 @@ } declare double @llvm.pow.f64(double, double) nounwind readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/Coroutines/ArgAddr.ll =================================================================== --- llvm/test/Transforms/Coroutines/ArgAddr.ll +++ llvm/test/Transforms/Coroutines/ArgAddr.ll @@ -65,3 +65,6 @@ declare void @llvm.coro.resume(i8*) declare void @llvm.coro.destroy(i8*) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/Coroutines/ex3.ll =================================================================== --- llvm/test/Transforms/Coroutines/ex3.ll +++ llvm/test/Transforms/Coroutines/ex3.ll @@ -58,3 +58,6 @@ declare void @llvm.coro.resume(i8*) declare void @llvm.coro.destroy(i8*) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll +++ llvm/test/Transforms/DeadStoreElimination/2016-07-17-UseAfterFree.ll @@ -30,3 +30,6 @@ attributes #0 = { nounwind } attributes #1 = { argmemonly nounwind } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/calloc-store.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/calloc-store.ll +++ llvm/test/Transforms/DeadStoreElimination/calloc-store.ll @@ -63,3 +63,6 @@ ; CHECK: store i8 %arg, i8* %1, align 4 ret i8* %1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/fence.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/fence.ll +++ llvm/test/Transforms/DeadStoreElimination/fence.ll @@ -94,3 +94,6 @@ ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/free.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/free.ll +++ llvm/test/Transforms/DeadStoreElimination/free.ll @@ -68,3 +68,6 @@ br label %bb } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/libcalls.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/libcalls.ll +++ llvm/test/Transforms/DeadStoreElimination/libcalls.ll @@ -68,3 +68,6 @@ ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll +++ llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll @@ -41,3 +41,6 @@ store i64 0, i64* %s ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/DeadStoreElimination/simple.ll =================================================================== --- llvm/test/Transforms/DeadStoreElimination/simple.ll +++ llvm/test/Transforms/DeadStoreElimination/simple.ll @@ -521,3 +521,6 @@ store i32 0, i32* %p ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GVN/calloc-load-removal.ll =================================================================== --- llvm/test/Transforms/GVN/calloc-load-removal.ll +++ llvm/test/Transforms/GVN/calloc-load-removal.ll @@ -23,3 +23,6 @@ } declare noalias i8* @calloc(i64, i64) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GVN/malloc-load-removal.ll =================================================================== --- llvm/test/Transforms/GVN/malloc-load-removal.ll +++ llvm/test/Transforms/GVN/malloc-load-removal.ll @@ -54,3 +54,6 @@ ; CHECK_NO_LIBCALLS: load ; CHECK_NO_LIBCALLS: icmp } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GVN/no_speculative_loads_with_asan.ll =================================================================== --- llvm/test/Transforms/GVN/no_speculative_loads_with_asan.ll +++ llvm/test/Transforms/GVN/no_speculative_loads_with_asan.ll @@ -53,3 +53,6 @@ ; CHECK-NOT: %[[LOAD:[^ ]+]] = load i32 ; CHECK: {{.*}} = phi + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GVN/nonescaping-malloc.ll =================================================================== --- llvm/test/Transforms/GVN/nonescaping-malloc.ll +++ llvm/test/Transforms/GVN/nonescaping-malloc.ll @@ -109,3 +109,6 @@ } declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll +++ llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll @@ -24,3 +24,6 @@ } declare noalias i8* @malloc(i64) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/MallocSROA-section.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/MallocSROA-section.ll +++ llvm/test/Transforms/GlobalOpt/MallocSROA-section.ll @@ -26,3 +26,6 @@ } declare noalias i8* @malloc(i32) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll +++ llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll @@ -113,3 +113,6 @@ store i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @GV2, i64 1, i64 0), i8*** %3 ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/cxx-dtor.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/cxx-dtor.ll +++ llvm/test/Transforms/GlobalOpt/cxx-dtor.ll @@ -31,3 +31,6 @@ call void @__cxx_global_var_init() ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/heap-sra-1.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/heap-sra-1.ll +++ llvm/test/Transforms/GlobalOpt/heap-sra-1.ll @@ -36,3 +36,6 @@ ret i32 %3 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/heap-sra-2.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/heap-sra-2.ll +++ llvm/test/Transforms/GlobalOpt/heap-sra-2.ll @@ -36,3 +36,6 @@ ret i32 %3 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/heap-sra-3.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/heap-sra-3.ll +++ llvm/test/Transforms/GlobalOpt/heap-sra-3.ll @@ -37,3 +37,6 @@ ret i32 %3 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/heap-sra-4.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/heap-sra-4.ll +++ llvm/test/Transforms/GlobalOpt/heap-sra-4.ll @@ -37,3 +37,6 @@ ret i32 %3 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/heap-sra-phi.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/heap-sra-phi.ll +++ llvm/test/Transforms/GlobalOpt/heap-sra-phi.ll @@ -42,3 +42,6 @@ bb2: ; preds = %bb1 ret i32 %tmp3 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll +++ llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll @@ -22,3 +22,6 @@ ; CHECK: ret i32 0 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll +++ llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll @@ -17,3 +17,6 @@ } declare noalias i8* @malloc(i64) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InferFunctionAttrs/annotate.ll =================================================================== --- llvm/test/Transforms/InferFunctionAttrs/annotate.ll +++ llvm/test/Transforms/InferFunctionAttrs/annotate.ll @@ -877,3 +877,6 @@ ; CHECK: attributes [[G0]] = { nounwind } ; CHECK: attributes [[G1]] = { nounwind readonly } ; CHECK-DARWIN: attributes [[G2]] = { argmemonly } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/2010-05-30-memcpy-Struct.ll =================================================================== --- llvm/test/Transforms/InstCombine/2010-05-30-memcpy-Struct.ll +++ llvm/test/Transforms/InstCombine/2010-05-30-memcpy-Struct.ll @@ -18,3 +18,6 @@ declare i32 @sprintf(i8*, i8*, ...) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/ARM/strcmp.ll =================================================================== --- llvm/test/Transforms/InstCombine/ARM/strcmp.ll +++ llvm/test/Transforms/InstCombine/ARM/strcmp.ll @@ -151,3 +151,6 @@ %temp1 = call arm_aapcs_vfpcc i32 @strcmp(i8* %str, i8* %str) ret i32 %temp1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/ARM/strcpy.ll =================================================================== --- llvm/test/Transforms/InstCombine/ARM/strcpy.ll +++ llvm/test/Transforms/InstCombine/ARM/strcpy.ll @@ -74,3 +74,6 @@ ; CHECK: call arm_aapcs_vfpcc i8* @strcpy ret i8* %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/abs-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/abs-1.ll +++ llvm/test/Transforms/InstCombine/abs-1.ll @@ -39,3 +39,6 @@ ret i64 %ret ; CHECK-NEXT: ret i64 [[RET]] } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/badmalloc.ll =================================================================== --- llvm/test/Transforms/InstCombine/badmalloc.ll +++ llvm/test/Transforms/InstCombine/badmalloc.ll @@ -39,3 +39,6 @@ %retval.0 = phi i8* [ %A, %if.end ], [ null, %entry ] ret i8* %retval.0 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/compare-unescaped.ll =================================================================== --- llvm/test/Transforms/InstCombine/compare-unescaped.ll +++ llvm/test/Transforms/InstCombine/compare-unescaped.ll @@ -162,3 +162,6 @@ } !0 = !{} + +!llvm.module.flags = !{!1} +!1 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/cos-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/cos-1.ll +++ llvm/test/Transforms/InstCombine/cos-1.ll @@ -36,3 +36,6 @@ %conv2 = fptrunc double %cos to float ret float %conv2 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/debug-line.ll =================================================================== --- llvm/test/Transforms/InstCombine/debug-line.ll +++ llvm/test/Transforms/InstCombine/debug-line.ll @@ -12,7 +12,7 @@ declare i32 @printf(i8*, ...) !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!10} +!llvm.module.flags = !{!10, !11} !0 = distinct !DISubprogram(name: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !8, scope: !1, type: !3) !1 = !DIFile(filename: "m.c", directory: "/private/tmp") @@ -24,3 +24,4 @@ !7 = !DILocation(line: 6, column: 1, scope: !6) !8 = !DIFile(filename: "m.c", directory: "/private/tmp") !10 = !{i32 1, !"Debug Info Version", i32 3} +!11 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/double-float-shrink-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/double-float-shrink-1.ll +++ llvm/test/Transforms/InstCombine/double-float-shrink-1.ll @@ -411,3 +411,6 @@ declare double @asin(double) declare double @asinh(double) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/double-float-shrink-2.ll =================================================================== --- llvm/test/Transforms/InstCombine/double-float-shrink-2.ll +++ llvm/test/Transforms/InstCombine/double-float-shrink-2.ll @@ -78,3 +78,6 @@ %F = fptrunc double %E to float ret float %F } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/err-rep-cold.ll =================================================================== --- llvm/test/Transforms/InstCombine/err-rep-cold.ll +++ llvm/test/Transforms/InstCombine/err-rep-cold.ll @@ -75,3 +75,6 @@ ; CHECK: attributes #[[AT1]] = { cold nounwind } ; CHECK: attributes #[[AT2]] = { cold } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/exp2-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/exp2-1.ll +++ llvm/test/Transforms/InstCombine/exp2-1.ll @@ -97,3 +97,6 @@ ; NOLDEXPF-NOT: call float @ldexpf ret float %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/fast-math.ll =================================================================== --- llvm/test/Transforms/InstCombine/fast-math.ll +++ llvm/test/Transforms/InstCombine/fast-math.ll @@ -831,3 +831,6 @@ ; CHECK-NEXT: select {{.*}} fp128 %a, fp128 %b ; CHECK-NEXT: ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/ffs-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/ffs-1.ll +++ llvm/test/Transforms/InstCombine/ffs-1.ll @@ -135,3 +135,6 @@ ret i32 %ret ; CHECK-FFS-NEXT: ret i32 [[RET]] } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/float-shrink-compare.ll =================================================================== --- llvm/test/Transforms/InstCombine/float-shrink-compare.ll +++ llvm/test/Transforms/InstCombine/float-shrink-compare.ll @@ -269,3 +269,6 @@ declare double @trunc(double) nounwind readnone declare double @fmin(double, double) nounwind readnone declare double @fmax(double, double) nounwind readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/fold-calls.ll =================================================================== --- llvm/test/Transforms/InstCombine/fold-calls.ll +++ llvm/test/Transforms/InstCombine/fold-calls.ll @@ -17,3 +17,6 @@ } declare double @sin(double) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/fprintf-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/fprintf-1.ll +++ llvm/test/Transforms/InstCombine/fprintf-1.ll @@ -96,3 +96,6 @@ ret i32 %1 ; CHECK-NEXT: ret i32 %1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/fputs-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/fputs-1.ll +++ llvm/test/Transforms/InstCombine/fputs-1.ll @@ -41,3 +41,6 @@ ret void ; CHECK-NEXT: ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/fwrite-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/fwrite-1.ll +++ llvm/test/Transforms/InstCombine/fwrite-1.ll @@ -55,3 +55,6 @@ ret void ; CHECK-NEXT: ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/inline-intrinsic-assert.ll =================================================================== --- llvm/test/Transforms/InstCombine/inline-intrinsic-assert.ll +++ llvm/test/Transforms/InstCombine/inline-intrinsic-assert.ll @@ -26,3 +26,6 @@ declare float @sqrtf(float) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/invoke.ll =================================================================== --- llvm/test/Transforms/InstCombine/invoke.ll +++ llvm/test/Transforms/InstCombine/invoke.ll @@ -63,3 +63,6 @@ tail call void @__cxa_call_unexpected(i8* %2) noreturn nounwind unreachable } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/isascii-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/isascii-1.ll +++ llvm/test/Transforms/InstCombine/isascii-1.ll @@ -30,3 +30,6 @@ ret i32 %ret ; CHECK-NEXT: ret i32 [[ZEXT]] } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/isdigit-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/isdigit-1.ll +++ llvm/test/Transforms/InstCombine/isdigit-1.ll @@ -46,3 +46,6 @@ ret i32 %ret ; CHECK-NEXT: ret i32 [[ZEXT]] } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/log-pow.ll =================================================================== --- llvm/test/Transforms/InstCombine/log-pow.ll +++ llvm/test/Transforms/InstCombine/log-pow.ll @@ -60,3 +60,6 @@ declare double @llvm.pow.f64(double, double) attributes #0 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/malloc-free-delete.ll =================================================================== --- llvm/test/Transforms/InstCombine/malloc-free-delete.ll +++ llvm/test/Transforms/InstCombine/malloc-free-delete.ll @@ -197,3 +197,6 @@ call void @"\01??3@YAXPEAX@Z"(i8* %new_long_long) builtin ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/memchr.ll =================================================================== --- llvm/test/Transforms/InstCombine/memchr.ll +++ llvm/test/Transforms/InstCombine/memchr.ll @@ -190,3 +190,6 @@ %cmp = icmp ne i8* %dst, null ret i1 %cmp } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/memcmp-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/memcmp-1.ll +++ llvm/test/Transforms/InstCombine/memcmp-1.ll @@ -121,3 +121,6 @@ ; CHECK: %cmp = icmp eq i16 %x, %y ; CHECK: ret i1 %cmp } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/memcpy-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/memcpy-1.ll +++ llvm/test/Transforms/InstCombine/memcpy-1.ll @@ -15,3 +15,6 @@ ret i8* %ret ; CHECK: ret i8* %mem1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/memmove-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/memmove-1.ll +++ llvm/test/Transforms/InstCombine/memmove-1.ll @@ -15,3 +15,6 @@ ret i8* %ret ; CHECK: ret i8* %mem1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/memset-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/memset-1.ll +++ llvm/test/Transforms/InstCombine/memset-1.ll @@ -63,3 +63,6 @@ attributes #1 = { nounwind } attributes #2 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/memset_chk-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/memset_chk-1.ll +++ llvm/test/Transforms/InstCombine/memset_chk-1.ll @@ -128,3 +128,6 @@ attributes #1 = { nounwind } attributes #2 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/no_cgscc_assert.ll =================================================================== --- llvm/test/Transforms/InstCombine/no_cgscc_assert.ll +++ llvm/test/Transforms/InstCombine/no_cgscc_assert.ll @@ -16,3 +16,6 @@ declare float @sqrtf(float) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/objsize-64.ll =================================================================== --- llvm/test/Transforms/InstCombine/objsize-64.ll +++ llvm/test/Transforms/InstCombine/objsize-64.ll @@ -37,3 +37,6 @@ tail call void @__cxa_call_unexpected(i8* %2) noreturn nounwind unreachable } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/objsize.ll =================================================================== --- llvm/test/Transforms/InstCombine/objsize.ll +++ llvm/test/Transforms/InstCombine/objsize.ll @@ -239,3 +239,6 @@ ret i32 %1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/osx-names.ll =================================================================== --- llvm/test/Transforms/InstCombine/osx-names.ll +++ llvm/test/Transforms/InstCombine/osx-names.ll @@ -28,3 +28,6 @@ } declare i32 @fprintf(%struct.__sFILE*, i8*, ...) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/pow-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/pow-1.ll +++ llvm/test/Transforms/InstCombine/pow-1.ll @@ -192,3 +192,6 @@ ; CHECK: attributes [[NUW_RO]] = { nounwind readonly } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/pow-exp.ll =================================================================== --- llvm/test/Transforms/InstCombine/pow-exp.ll +++ llvm/test/Transforms/InstCombine/pow-exp.ll @@ -47,3 +47,6 @@ declare double @exp2(double) declare double @llvm.pow.f64(double, double) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/pow-sqrt.ll =================================================================== --- llvm/test/Transforms/InstCombine/pow-sqrt.ll +++ llvm/test/Transforms/InstCombine/pow-sqrt.ll @@ -11,3 +11,6 @@ declare double @llvm.pow.f64(double, double) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/printf-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/printf-1.ll +++ llvm/test/Transforms/InstCombine/printf-1.ll @@ -129,3 +129,6 @@ ret i32 %ret ; CHECK-NEXT: ret i32 %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/printf-2.ll =================================================================== --- llvm/test/Transforms/InstCombine/printf-2.ll +++ llvm/test/Transforms/InstCombine/printf-2.ll @@ -51,3 +51,6 @@ ret void ; CHECK-NEXT: ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/printf-3.ll =================================================================== --- llvm/test/Transforms/InstCombine/printf-3.ll +++ llvm/test/Transforms/InstCombine/printf-3.ll @@ -37,3 +37,6 @@ declare i32 @__CxxFrameHandler3(...) declare i32 @printf(i8*, ...) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/puts-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/puts-1.ll +++ llvm/test/Transforms/InstCombine/puts-1.ll @@ -29,3 +29,6 @@ ret i32 %ret ; CHECK-NEXT: ret i32 %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/simplify-libcalls.ll =================================================================== --- llvm/test/Transforms/InstCombine/simplify-libcalls.ll +++ llvm/test/Transforms/InstCombine/simplify-libcalls.ll @@ -178,3 +178,6 @@ attributes #0 = { nobuiltin } attributes #1 = { builtin } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/sincospi.ll =================================================================== --- llvm/test/Transforms/InstCombine/sincospi.ll +++ llvm/test/Transforms/InstCombine/sincospi.ll @@ -99,3 +99,6 @@ ; CHECK-LABEL: @test_fptr ; CHECK: __sinpi } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/sprintf-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/sprintf-1.ll +++ llvm/test/Transforms/InstCombine/sprintf-1.ll @@ -98,3 +98,6 @@ ret void ; CHECK-NEXT: ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/sqrt.ll =================================================================== --- llvm/test/Transforms/InstCombine/sqrt.ll +++ llvm/test/Transforms/InstCombine/sqrt.ll @@ -52,3 +52,6 @@ declare i32 @foo(double) declare double @sqrt(double) readnone + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/stpcpy-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/stpcpy-1.ll +++ llvm/test/Transforms/InstCombine/stpcpy-1.ll @@ -44,3 +44,6 @@ ; CHECK: call i8* @stpcpy ret i8* %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/stpcpy_chk-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/stpcpy_chk-1.ll +++ llvm/test/Transforms/InstCombine/stpcpy_chk-1.ll @@ -101,3 +101,6 @@ declare i8* @__stpcpy_chk(i8*, i8*, i32) nounwind declare i32 @llvm.objectsize.i32.p0i8(i8*, i1) nounwind readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strcat-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strcat-1.ll +++ llvm/test/Transforms/InstCombine/strcat-1.ll @@ -36,3 +36,6 @@ call i32 @puts( i8* %rslt3 ) ret i32 0 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strcat-2.ll =================================================================== --- llvm/test/Transforms/InstCombine/strcat-2.ll +++ llvm/test/Transforms/InstCombine/strcat-2.ll @@ -30,3 +30,6 @@ call i8* @strcat(i8* %dst, i8* %src) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strchr-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strchr-1.ll +++ llvm/test/Transforms/InstCombine/strchr-1.ll @@ -93,3 +93,6 @@ %cmp = icmp ne i8* %dst, null ret i1 %cmp } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strcmp-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strcmp-1.ll +++ llvm/test/Transforms/InstCombine/strcmp-1.ll @@ -80,3 +80,6 @@ %temp1 = call i32 @strcmp(i8* %str, i8* %str) ret i32 %temp1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strcpy-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strcpy-1.ll +++ llvm/test/Transforms/InstCombine/strcpy-1.ll @@ -43,3 +43,6 @@ ; CHECK: call i8* @strcpy ret i8* %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strcpy_chk-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strcpy_chk-1.ll +++ llvm/test/Transforms/InstCombine/strcpy_chk-1.ll @@ -101,3 +101,6 @@ declare i8* @__strcpy_chk(i8*, i8*, i32) nounwind declare i32 @llvm.objectsize.i32.p0i8(i8*, i1) nounwind readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strcspn-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strcspn-1.ll +++ llvm/test/Transforms/InstCombine/strcspn-1.ll @@ -55,3 +55,6 @@ ret i64 %ret ; CHECK-NEXT: ret i64 %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strlen-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strlen-1.ll +++ llvm/test/Transforms/InstCombine/strlen-1.ll @@ -175,3 +175,6 @@ ret i32 %hello_l } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strncat-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strncat-1.ll +++ llvm/test/Transforms/InstCombine/strncat-1.ll @@ -35,3 +35,6 @@ call i32 @puts(i8* %rslt3) ret i32 0 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strncat-2.ll =================================================================== --- llvm/test/Transforms/InstCombine/strncat-2.ll +++ llvm/test/Transforms/InstCombine/strncat-2.ll @@ -51,3 +51,6 @@ call i8* @strncat(i8* %dst, i8* %src, i32 1) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strncmp-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strncmp-1.ll +++ llvm/test/Transforms/InstCombine/strncmp-1.ll @@ -97,3 +97,6 @@ %temp1 = call i32 @strncmp(i8* %str, i8* %str, i32 %n) ret i32 %temp1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strncpy-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strncpy-1.ll +++ llvm/test/Transforms/InstCombine/strncpy-1.ll @@ -93,3 +93,6 @@ ; CHECK: call i8* @strncpy ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strncpy_chk-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strncpy_chk-1.ll +++ llvm/test/Transforms/InstCombine/strncpy_chk-1.ll @@ -69,3 +69,6 @@ } declare i8* @__strncpy_chk(i8*, i8*, i32, i32) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strpbrk-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strpbrk-1.ll +++ llvm/test/Transforms/InstCombine/strpbrk-1.ll @@ -66,3 +66,6 @@ ret i8* %ret ; CHECK-NEXT: ret i8* %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strrchr-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strrchr-1.ll +++ llvm/test/Transforms/InstCombine/strrchr-1.ll @@ -63,3 +63,6 @@ store i8* %dst, i8** @chp ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strspn-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strspn-1.ll +++ llvm/test/Transforms/InstCombine/strspn-1.ll @@ -54,3 +54,6 @@ ret i64 %ret ; CHECK-NEXT: ret i64 %ret } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strstr-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strstr-1.ll +++ llvm/test/Transforms/InstCombine/strstr-1.ll @@ -63,3 +63,6 @@ ; CHECK: icmp eq {{i[0-9]+}} [[NCMP]], 0 ; CHECK: ret i1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/strto-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/strto-1.ll +++ llvm/test/Transforms/InstCombine/strto-1.ll @@ -80,3 +80,6 @@ ; CHECK-NEXT: call i64 @strtol(i8* %x, i8** %endptr, i32 10) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/tan.ll =================================================================== --- llvm/test/Transforms/InstCombine/tan.ll +++ llvm/test/Transforms/InstCombine/tan.ll @@ -21,3 +21,6 @@ declare float @tanf(float) declare float @atanf(float) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/toascii-1.ll =================================================================== --- llvm/test/Transforms/InstCombine/toascii-1.ll +++ llvm/test/Transforms/InstCombine/toascii-1.ll @@ -57,3 +57,6 @@ ret i32 %ret ; CHECK-NEXT: ret i32 [[AND]] } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/weak-symbols.ll =================================================================== --- llvm/test/Transforms/InstCombine/weak-symbols.ll +++ llvm/test/Transforms/InstCombine/weak-symbols.ll @@ -31,3 +31,6 @@ } declare i32 @strcmp(i8*, i8*) nounwind readonly + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstCombine/win-math.ll =================================================================== --- llvm/test/Transforms/InstCombine/win-math.ll +++ llvm/test/Transforms/InstCombine/win-math.ll @@ -293,3 +293,6 @@ %1 = call float @powf(float %x, float 0.5) ret float %1 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstMerge/st_sink_bugfix_22613.ll =================================================================== --- llvm/test/Transforms/InstMerge/st_sink_bugfix_22613.ll +++ llvm/test/Transforms/InstMerge/st_sink_bugfix_22613.ll @@ -104,3 +104,6 @@ ; Function Attrs: noreturn nounwind declare void @abort() + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstSimplify/call-callconv.ll =================================================================== --- llvm/test/Transforms/InstSimplify/call-callconv.ll +++ llvm/test/Transforms/InstSimplify/call-callconv.ll @@ -46,3 +46,6 @@ ; CHECK: %[[CMP:.*]] = icmp ne i8 %[[STRLENFIRST]], 0 ; CHECK: ret i1 %[[CMP]] } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/InstSimplify/call.ll =================================================================== --- llvm/test/Transforms/InstSimplify/call.ll +++ llvm/test/Transforms/InstSimplify/call.ll @@ -223,3 +223,6 @@ declare noalias i8* @malloc(i64) declare <8 x i32> @llvm.masked.load.v8i32.p0v8i32(<8 x i32>*, i32, <8 x i1>, <8 x i32>) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/basic-address-space.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/basic-address-space.ll +++ llvm/test/Transforms/LoopIdiom/basic-address-space.ll @@ -89,3 +89,6 @@ ret i32 %tmp8 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/basic.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/basic.ll +++ llvm/test/Transforms/LoopIdiom/basic.ll @@ -566,3 +566,6 @@ ; Validate that "memset_pattern" has the proper attributes. ; CHECK: declare void @memset_pattern16(i8* nocapture, i8* nocapture readonly, i64) [[ATTRS:#[0-9]+]] ; CHECK: [[ATTRS]] = { argmemonly } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/debug-line.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/debug-line.ll +++ llvm/test/Transforms/LoopIdiom/debug-line.ll @@ -27,7 +27,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -!llvm.module.flags = !{!19} +!llvm.module.flags = !{!19, !20} !llvm.dbg.cu = !{!2} !0 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !18, scope: !1, type: !3) @@ -50,3 +50,4 @@ !17 = !DILocation(line: 5, column: 1, scope: !12) !18 = !DIFile(filename: "li.c", directory: "/private/tmp") !19 = !{i32 1, !"Debug Info Version", i32 3} +!20 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/lir-heurs-multi-block-loop.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/lir-heurs-multi-block-loop.ll +++ llvm/test/Transforms/LoopIdiom/lir-heurs-multi-block-loop.ll @@ -180,3 +180,6 @@ ret i32 %BASKET.0.lcssa } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/pr28196.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/pr28196.ll +++ llvm/test/Transforms/LoopIdiom/pr28196.ll @@ -24,3 +24,6 @@ ; CHECK-LABEL: define void @test1( ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* null, i8* inttoptr (i64 4 to i8*), i64 24, i32 4, i1 false) ; CHECK-NOT: store + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/struct.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/struct.ll +++ llvm/test/Transforms/LoopIdiom/struct.ll @@ -219,3 +219,6 @@ ; CHECK: call void @llvm.memset ; CHECK-NOT: store } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/struct_pattern.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/struct_pattern.ll +++ llvm/test/Transforms/LoopIdiom/struct_pattern.ll @@ -184,3 +184,6 @@ ; CHECK-LABEL: @bar5( ; CHECK-NOT: call void @memset_pattern16 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopIdiom/unroll.ll =================================================================== --- llvm/test/Transforms/LoopIdiom/unroll.ll +++ llvm/test/Transforms/LoopIdiom/unroll.ll @@ -78,3 +78,6 @@ ; CHECK: call void @memset_pattern16 ; CHECK-NOT: store } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopVectorize/X86/svml-calls.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/X86/svml-calls.ll +++ llvm/test/Transforms/LoopVectorize/X86/svml-calls.ll @@ -183,3 +183,6 @@ } attributes #0 = { nounwind readnone } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/LoopVectorize/X86/veclib-calls.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/X86/veclib-calls.ll +++ llvm/test/Transforms/LoopVectorize/X86/veclib-calls.ll @@ -630,3 +630,6 @@ for.end: ; preds = %for.body, %entry ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll +++ llvm/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll @@ -34,3 +34,6 @@ } declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll +++ llvm/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll @@ -20,3 +20,6 @@ } declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/align.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/align.ll +++ llvm/test/Transforms/MemCpyOpt/align.ll @@ -35,3 +35,6 @@ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a4.cast, i8* %a8.cast, i64 4, i32 4, i1 false) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/atomic.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/atomic.ll +++ llvm/test/Transforms/MemCpyOpt/atomic.ll @@ -39,3 +39,6 @@ ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/callslot_aa.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/callslot_aa.ll +++ llvm/test/Transforms/MemCpyOpt/callslot_aa.ll @@ -20,3 +20,6 @@ !0 = !{!0} !1 = distinct !{!1, !0, !"dst"} !2 = distinct !{!1} + +!llvm.module.flags = !{!3} +!3 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/callslot_deref.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/callslot_deref.ll +++ llvm/test/Transforms/MemCpyOpt/callslot_deref.ll @@ -28,3 +28,6 @@ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dst, i8* %p, i64 4096, i32 1, i1 false) #2 ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll +++ llvm/test/Transforms/MemCpyOpt/fca2memcpy.ll @@ -108,3 +108,6 @@ store %S %1, %S* %dst2 ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/form-memset.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/form-memset.ll +++ llvm/test/Transforms/MemCpyOpt/form-memset.ll @@ -299,3 +299,6 @@ ; CHECK-NOT: store ; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 1, i64 23, i32 4, i1 false) } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/invariant.start.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/invariant.start.ll +++ llvm/test/Transforms/MemCpyOpt/invariant.start.ll @@ -47,3 +47,6 @@ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dst2, i8* %dst1, i64 128, i32 8, i1 false) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/lifetime.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/lifetime.ll +++ llvm/test/Transforms/MemCpyOpt/lifetime.ll @@ -23,3 +23,6 @@ } attributes #1 = { argmemonly nounwind } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/loadstore-sret.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/loadstore-sret.ll +++ llvm/test/Transforms/MemCpyOpt/loadstore-sret.ll @@ -23,3 +23,6 @@ } declare void @_Z3barv(%"class.std::auto_ptr"* nocapture sret) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll +++ llvm/test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll @@ -53,3 +53,6 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) nounwind declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memcpy-to-memset.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memcpy-to-memset.ll +++ llvm/test/Transforms/MemCpyOpt/memcpy-to-memset.ll @@ -17,3 +17,6 @@ ; CHECK-NOT: call void @llvm.memcpy ; CHECK: ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memcpy-undef.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memcpy-undef.ll +++ llvm/test/Transforms/MemCpyOpt/memcpy-undef.ll @@ -44,3 +44,6 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memcpy.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memcpy.ll +++ llvm/test/Transforms/MemCpyOpt/memcpy.ll @@ -209,3 +209,6 @@ ; CHECK: attributes #1 = { argmemonly nounwind } ; CHECK: attributes #2 = { nounwind ssp } ; CHECK: attributes #3 = { nounwind ssp uwtable } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memmove.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memmove.ll +++ llvm/test/Transforms/MemCpyOpt/memmove.ll @@ -38,3 +38,6 @@ tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %P, i8* %add.ptr, i64 17, i32 1, i1 false) ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.ll +++ llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.ll @@ -166,3 +166,6 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) declare void @llvm.memset.p0i8.i128(i8* nocapture, i8, i128, i32, i1) declare void @llvm.memcpy.p0i8.p0i8.i128(i8* nocapture, i8* nocapture readonly, i128, i32, i1) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/memset-memcpy-to-2x-memset.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/memset-memcpy-to-2x-memset.ll +++ llvm/test/Transforms/MemCpyOpt/memset-memcpy-to-2x-memset.ll @@ -99,3 +99,6 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/pr29105.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/pr29105.ll +++ llvm/test/Transforms/MemCpyOpt/pr29105.ll @@ -37,3 +37,6 @@ attributes #0 = { uwtable } attributes #1 = { argmemonly nounwind } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/profitable-memset.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/profitable-memset.ll +++ llvm/test/Transforms/MemCpyOpt/profitable-memset.ll @@ -18,3 +18,6 @@ ret void } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/MemCpyOpt/sret.ll =================================================================== --- llvm/test/Transforms/MemCpyOpt/sret.ll +++ llvm/test/Transforms/MemCpyOpt/sret.ll @@ -28,3 +28,6 @@ declare void @ccoshl(%0* noalias nocapture sret, %0* byval) nounwind declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/PhaseOrdering/basic.ll =================================================================== --- llvm/test/Transforms/PhaseOrdering/basic.ll +++ llvm/test/Transforms/PhaseOrdering/basic.ll @@ -49,3 +49,6 @@ ; CHECK: %add = shl nuw nsw i32 %div, 1 ; CHECK: ret i32 0 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/SCCP/calltest.ll =================================================================== --- llvm/test/Transforms/SCCP/calltest.ll +++ llvm/test/Transforms/SCCP/calltest.ll @@ -29,3 +29,6 @@ %1 = call %empty @has_side_effects() ret i32 0 } + +!llvm.module.flags = !{!0} +!0 = !{i32 4, !"hosted", i32 1} Index: llvm/test/Transforms/Util/combine-alias-scope-metadata.ll =================================================================== --- llvm/test/Transforms/Util/combine-alias-scope-metadata.ll +++ llvm/test/Transforms/Util/combine-alias-scope-metadata.ll @@ -22,3 +22,6 @@ !4 = distinct !{!1, !2} !5 = distinct !{!2, !3} !6 = distinct !{!1, !2} + +!llvm.module.flags = !{!7} +!7 = !{i32 4, !"hosted", i32 1} Index: llvm/tools/llc/llc.cpp =================================================================== --- llvm/tools/llc/llc.cpp +++ llvm/tools/llc/llc.cpp @@ -427,7 +427,7 @@ legacy::PassManager PM; // Add an appropriate TargetLibraryInfo pass for the module's triple. - TargetLibraryInfoImpl TLII(Triple(M->getTargetTriple())); + TargetLibraryInfoImpl TLII(*M); // The -disable-simplify-libcalls flag actually disables all builtin optzns. if (DisableSimplifyLibCalls) Index: llvm/tools/opt/opt.cpp =================================================================== --- llvm/tools/opt/opt.cpp +++ llvm/tools/opt/opt.cpp @@ -528,7 +528,7 @@ legacy::PassManager Passes; // Add an appropriate TargetLibraryInfo pass for the module's triple. - TargetLibraryInfoImpl TLII(ModuleTriple); + TargetLibraryInfoImpl TLII(*M); // The -disable-simplify-libcalls flag actually disables all builtin optzns. if (DisableSimplifyLibCalls)