diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 169a713b4f5..7b7972f3187 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -53,6 +53,13 @@ Non-comprehensive list of changes in this release Changes to the LLVM IR ---------------------- +* Unnamed function arguments now get printed with their automatically + generated name (e.g. "i32 %0") in definitions. This may require front-ends + to update their tests; if so there is a script utils/add_argument_names.py + that correctly converted 80-90% of Clang tests. Some manual work will almost + certainly still be needed. + + Changes to building LLVM ------------------------ diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 87dff6468f2..e707e957a66 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2551,6 +2551,7 @@ bool LLParser::ParseOptionalOperandBundles( /// bool LLParser::ParseArgumentList(SmallVectorImpl &ArgList, bool &isVarArg){ + unsigned CurValID = 0; isVarArg = false; assert(Lex.getKind() == lltok::lparen); Lex.Lex(); // eat the (. @@ -2575,6 +2576,12 @@ bool LLParser::ParseArgumentList(SmallVectorImpl &ArgList, if (Lex.getKind() == lltok::LocalVar) { Name = Lex.getStrVal(); Lex.Lex(); + } else if (Lex.getKind() == lltok::LocalVarID) { + if (Lex.getUIntVal() != CurValID) + return Error(TypeLoc, "argument expected to be numbered '%" + + Twine(CurValID) + "'"); + ++CurValID; + Lex.Lex(); } if (!FunctionType::isValidArgumentType(ArgTy)) @@ -2602,6 +2609,13 @@ bool LLParser::ParseArgumentList(SmallVectorImpl &ArgList, Name = Lex.getStrVal(); Lex.Lex(); } else { + if (Lex.getKind() == lltok::LocalVarID) { + if (Lex.getUIntVal() != CurValID) + return Error(TypeLoc, "argument expected to be numbered '%" + + Twine(CurValID) + "'"); + Lex.Lex(); + } + ++CurValID; Name = ""; } diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp index eb5760daecb..2462e933ba4 100644 --- a/lib/IR/AsmWriter.cpp +++ b/lib/IR/AsmWriter.cpp @@ -3553,6 +3553,10 @@ void AssemblyWriter::printArgument(const Argument *Arg, AttributeSet Attrs) { if (Arg->hasName()) { Out << ' '; PrintLLVMName(Out, Arg); + } else { + int Slot = Machine.getLocalSlot(Arg); + assert(Slot != -1 && "expect argument in function here"); + Out << " %" << Slot; } } diff --git a/test/Assembler/block-labels.ll b/test/Assembler/block-labels.ll index 1dcf496ad49..9ab55e00c2d 100644 --- a/test/Assembler/block-labels.ll +++ b/test/Assembler/block-labels.ll @@ -38,11 +38,11 @@ $N: ; CHECK-NEXT: ret i32 %4 ; CHECK-NEXT: } -define void @test2(i32, i32) { +define void @test2(i32 %0, i32 %1) { ; entry label id still not printed on output 2: ret void } -; CHECK-LABEL: define void @test2(i32, i32) { +; CHECK-LABEL: define void @test2(i32 %0, i32 %1) { ; CHECK-NEXT: ret void diff --git a/test/Assembler/byval-type-attr.ll b/test/Assembler/byval-type-attr.ll index eb17a30db3b..c868885d2cc 100644 --- a/test/Assembler/byval-type-attr.ll +++ b/test/Assembler/byval-type-attr.ll @@ -1,12 +1,12 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s -; CHECK: define void @foo(i32* byval(i32) align 4) -define void @foo(i32* byval(i32) align 4) { +; CHECK: define void @foo(i32* byval(i32) align 4 %0) +define void @foo(i32* byval(i32) align 4 %0) { ret void } -; CHECK: define void @bar({ i32*, i8 }* byval({ i32*, i8 }) align 4) -define void @bar({i32*, i8}* byval({i32*, i8}) align 4) { +; CHECK: define void @bar({ i32*, i8 }* byval({ i32*, i8 }) align 4 %0) +define void @bar({i32*, i8}* byval({i32*, i8}) align 4 %0) { ret void } diff --git a/test/Assembler/call-nonzero-program-addrspace-2.ll b/test/Assembler/call-nonzero-program-addrspace-2.ll index cde546e0ceb..6ec1fd0e2ab 100644 --- a/test/Assembler/call-nonzero-program-addrspace-2.ll +++ b/test/Assembler/call-nonzero-program-addrspace-2.ll @@ -3,7 +3,7 @@ ; Check that numbered variables in a nonzero program address space 200 can be used in a call instruction -define i8 @test_unnamed(i8(i32)*, i8(i32) addrspace(42)*) { +define i8 @test_unnamed(i8(i32)*, i8(i32) addrspace(42)* %0) { ; Calls with explicit address spaces are fine: call addrspace(0) i8 %0(i32 0) call addrspace(42) i8 %1(i32 0) @@ -14,7 +14,7 @@ define i8 @test_unnamed(i8(i32)*, i8(i32) addrspace(42)*) { } ; PROGAS42: target datalayout = "P42" -; PROGAS42: define i8 @test_unnamed(i8 (i32)*, i8 (i32) addrspace(42)*) addrspace(42) { +; PROGAS42: define i8 @test_unnamed(i8 (i32)* %0, i8 (i32) addrspace(42)* %1) addrspace(42) { ; PROGAS42-NEXT: %3 = call addrspace(0) i8 %0(i32 0) ; PROGAS42-NEXT: %4 = call addrspace(42) i8 %1(i32 0) ; PROGAS42-NEXT: %5 = call addrspace(42) i8 %1(i32 0) diff --git a/test/Assembler/incorrect-tdep-attrs-parsing.ll b/test/Assembler/incorrect-tdep-attrs-parsing.ll index bf8152b69dc..7105eac516d 100644 --- a/test/Assembler/incorrect-tdep-attrs-parsing.ll +++ b/test/Assembler/incorrect-tdep-attrs-parsing.ll @@ -1,6 +1,6 @@ ; RUN: llvm-as < %s | llvm-dis | FileCheck %s -; CHECK: define i32 @f(i64 "foo bar", i64, i64, i64 "xyz") { +; CHECK: define i32 @f(i64 "foo bar" %0, i64 %1, i64 %2, i64 "xyz" %3) { define i32 @f(i64 "foo bar", i64, i64, i64 "xyz") { ret i32 41 } diff --git a/test/Assembler/invalid-arg-num-1.ll b/test/Assembler/invalid-arg-num-1.ll new file mode 100644 index 00000000000..ee13c339dec --- /dev/null +++ b/test/Assembler/invalid-arg-num-1.ll @@ -0,0 +1,6 @@ +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s + +; CHECK: error: argument expected to be numbered '%1' +define void @foo(i32 %0, i32 %5) { + ret void +} diff --git a/test/Assembler/invalid-arg-num-2.ll b/test/Assembler/invalid-arg-num-2.ll new file mode 100644 index 00000000000..6ecb0033512 --- /dev/null +++ b/test/Assembler/invalid-arg-num-2.ll @@ -0,0 +1,6 @@ +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s + +; CHECK: error: argument expected to be numbered '%1' +define void @foo(i8 %0, i32 %named, i32 %2) { + ret void +} diff --git a/test/Assembler/invalid-arg-num-3.ll b/test/Assembler/invalid-arg-num-3.ll new file mode 100644 index 00000000000..f1638365630 --- /dev/null +++ b/test/Assembler/invalid-arg-num-3.ll @@ -0,0 +1,6 @@ +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s + +; CHECK: error: argument expected to be numbered '%0' +define void @foo(i8 %1) { + ret void +} diff --git a/test/Bindings/llvm-c/debug_info.ll b/test/Bindings/llvm-c/debug_info.ll index 740f18fdc90..6cddd1ac29a 100644 --- a/test/Bindings/llvm-c/debug_info.ll +++ b/test/Bindings/llvm-c/debug_info.ll @@ -3,7 +3,7 @@ ; CHECK: ; ModuleID = 'debuginfo.c' ; CHECK-NEXT: source_filename = "debuginfo.c" -; CHECK: define i64 @foo(i64, i64, <10 x i64>) !dbg !20 { +; CHECK: define i64 @foo(i64 %0, i64 %1, <10 x i64> %2) !dbg !20 { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void @llvm.dbg.declare(metadata i64 0, metadata !27, metadata !DIExpression()), !dbg !32 ; CHECK-NEXT: call void @llvm.dbg.declare(metadata i64 0, metadata !28, metadata !DIExpression()), !dbg !32 diff --git a/test/Bitcode/attributes-3.3.ll b/test/Bitcode/attributes-3.3.ll index f1b37d19912..dc7834eaa16 100644 --- a/test/Bitcode/attributes-3.3.ll +++ b/test/Bitcode/attributes-3.3.ll @@ -5,14 +5,14 @@ ; The test checks that LLVM does not silently misread attributes of ; older bitcode files. -define void @f1(i8 zeroext) -; CHECK: define void @f1(i8 zeroext) +define void @f1(i8 zeroext %0) +; CHECK: define void @f1(i8 zeroext %0) { ret void; } -define void @f2(i8 signext) -; CHECK: define void @f2(i8 signext) +define void @f2(i8 signext %0) +; CHECK: define void @f2(i8 signext %0) { ret void; } @@ -23,14 +23,14 @@ define void @f3() noreturn ret void; } -define void @f4(i8 inreg) -; CHECK: define void @f4(i8 inreg) +define void @f4(i8 inreg %0) +; CHECK: define void @f4(i8 inreg %0) { ret void; } -define void @f5(i8* sret) -; CHECK: define void @f5(i8* sret) +define void @f5(i8* sret %0) +; CHECK: define void @f5(i8* sret %0) { ret void; } @@ -41,20 +41,20 @@ define void @f6() nounwind ret void; } -define void @f7(i8* noalias) -; CHECK: define void @f7(i8* noalias) +define void @f7(i8* noalias %0) +; CHECK: define void @f7(i8* noalias %0) { ret void; } -define void @f8(i8* byval) -; CHECK: define void @f8(i8* byval(i8)) +define void @f8(i8* byval %0) +; CHECK: define void @f8(i8* byval(i8) %0) { ret void; } -define void @f9(i8* nest) -; CHECK: define void @f9(i8* nest) +define void @f9(i8* nest %0) +; CHECK: define void @f9(i8* nest %0) { ret void; } @@ -101,14 +101,14 @@ define void @f16() sspreq ret void; } -define void @f17(i8 align 4) -; CHECK: define void @f17(i8 align 4) +define void @f17(i8 align 4 %0) +; CHECK: define void @f17(i8 align 4 %0) { ret void; } -define void @f18(i8* nocapture) -; CHECK: define void @f18(i8* nocapture) +define void @f18(i8* nocapture %0) +; CHECK: define void @f18(i8* nocapture %0) { ret void; } diff --git a/test/Bitcode/attributes.ll b/test/Bitcode/attributes.ll index 03a98a58ef0..cc3d076086c 100644 --- a/test/Bitcode/attributes.ll +++ b/test/Bitcode/attributes.ll @@ -2,14 +2,14 @@ ; RUN: verify-uselistorder < %s ; PR12696 -define void @f1(i8 zeroext) -; CHECK: define void @f1(i8 zeroext) +define void @f1(i8 zeroext %0) +; CHECK: define void @f1(i8 zeroext %0) { ret void; } -define void @f2(i8 signext) -; CHECK: define void @f2(i8 signext) +define void @f2(i8 signext %0) +; CHECK: define void @f2(i8 signext %0) { ret void; } @@ -20,14 +20,14 @@ define void @f3() noreturn ret void; } -define void @f4(i8 inreg) -; CHECK: define void @f4(i8 inreg) +define void @f4(i8 inreg %0) +; CHECK: define void @f4(i8 inreg %0) { ret void; } -define void @f5(i8* sret) -; CHECK: define void @f5(i8* sret) +define void @f5(i8* sret %0) +; CHECK: define void @f5(i8* sret %0) { ret void; } @@ -38,20 +38,20 @@ define void @f6() nounwind ret void; } -define void @f7(i8* noalias) -; CHECK: define void @f7(i8* noalias) +define void @f7(i8* noalias %0) +; CHECK: define void @f7(i8* noalias %0) { ret void; } -define void @f8(i8* byval) -; CHECK: define void @f8(i8* byval(i8)) +define void @f8(i8* byval %0) +; CHECK: define void @f8(i8* byval(i8) %0) { ret void; } -define void @f9(i8* nest) -; CHECK: define void @f9(i8* nest) +define void @f9(i8* nest %0) +; CHECK: define void @f9(i8* nest %0) { ret void; } @@ -98,14 +98,14 @@ define void @f16() sspreq ret void; } -define void @f17(i8 align 4) -; CHECK: define void @f17(i8 align 4) +define void @f17(i8 align 4 %0) +; CHECK: define void @f17(i8 align 4 %0) { ret void; } -define void @f18(i8* nocapture) -; CHECK: define void @f18(i8* nocapture) +define void @f18(i8* nocapture %0) +; CHECK: define void @f18(i8* nocapture %0) { ret void; } @@ -214,8 +214,8 @@ define void @f35() optnone noinline ret void; } -define void @f36(i8* inalloca) { -; CHECK: define void @f36(i8* inalloca) { +define void @f36(i8* inalloca %0) { +; CHECK: define void @f36(i8* inalloca %0) { ret void } @@ -240,8 +240,8 @@ define dereferenceable(18446744073709551606) i8* @f40(i8* dereferenceable(184467 ret i8* %a } -define void @f41(i8* align 32, double* align 64) { -; CHECK: define void @f41(i8* align 32, double* align 64) { +define void @f41(i8* align 32 %0, double* align 64 %1) { +; CHECK: define void @f41(i8* align 32 %0, double* align 64 %1) { ret void } @@ -262,13 +262,13 @@ define void @f44() argmemonly ret void; } -; CHECK: define "string_attribute" void @f45(i32 "string_attribute") -define "string_attribute" void @f45(i32 "string_attribute") { +; CHECK: define "string_attribute" void @f45(i32 "string_attribute" %0) +define "string_attribute" void @f45(i32 "string_attribute" %0) { ret void } -; CHECK: define "string_attribute_with_value"="value" void @f46(i32 "string_attribute_with_value"="value") -define "string_attribute_with_value"="value" void @f46(i32 "string_attribute_with_value"="value") { +; CHECK: define "string_attribute_with_value"="value" void @f46(i32 "string_attribute_with_value"="value" %0) +define "string_attribute_with_value"="value" void @f46(i32 "string_attribute_with_value"="value" %0) { ret void } @@ -287,20 +287,20 @@ define void @f49() inaccessiblemem_or_argmemonly { ret void } -; CHECK: define void @f50(i8* swiftself) -define void @f50(i8* swiftself) +; CHECK: define void @f50(i8* swiftself %0) +define void @f50(i8* swiftself %0) { ret void; } -; CHECK: define i32 @f51(i8** swifterror) -define i32 @f51(i8** swifterror) +; CHECK: define i32 @f51(i8** swifterror %0) +define i32 @f51(i8** swifterror %0) { ret i32 0 } -; CHECK: define i32 @f52(i32, i8** swifterror) -define i32 @f52(i32, i8** swifterror) +; CHECK: define i32 @f52(i32 %0, i8** swifterror %1) +define i32 @f52(i32 %0, i8** swifterror %1) { ret i32 0 } @@ -318,13 +318,13 @@ entry: ret float 1.0 } -; CHECK: define i8* @f54(i32) #30 -define i8* @f54(i32) allocsize(0) { +; CHECK: define i8* @f54(i32 %0) #30 +define i8* @f54(i32 %0) allocsize(0) { ret i8* null } -; CHECK: define i8* @f55(i32, i32) #31 -define i8* @f55(i32, i32) allocsize(0, 1) { +; CHECK: define i8* @f55(i32 %0, i32 %1) #31 +define i8* @f55(i32 %0, i32 %1) allocsize(0, 1) { ret i8* null } diff --git a/test/Bitcode/avr-calling-conventions.ll b/test/Bitcode/avr-calling-conventions.ll index ea1005d1477..1743b3324b0 100644 --- a/test/Bitcode/avr-calling-conventions.ll +++ b/test/Bitcode/avr-calling-conventions.ll @@ -1,16 +1,16 @@ ; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK: define avr_intrcc void @foo(i8) -define avr_intrcc void @foo(i8) { +; CHECK: define avr_intrcc void @foo(i8 %0) +define avr_intrcc void @foo(i8 %0) { ret void } -; CHECK: define avr_signalcc void @bar(i8) -define avr_signalcc void @bar(i8) { +; CHECK: define avr_signalcc void @bar(i8 %0) +define avr_signalcc void @bar(i8 %0) { ret void } -; CHECK: define void @baz(i8) -define void @baz(i8) { +; CHECK: define void @baz(i8 %0) +define void @baz(i8 %0) { ret void } diff --git a/test/CodeGen/AMDGPU/rewrite-out-arguments-address-space.ll b/test/CodeGen/AMDGPU/rewrite-out-arguments-address-space.ll index e0aed8aa331..1ab38398acd 100644 --- a/test/CodeGen/AMDGPU/rewrite-out-arguments-address-space.ll +++ b/test/CodeGen/AMDGPU/rewrite-out-arguments-address-space.ll @@ -6,7 +6,7 @@ ; CHECK-LABEL: define private %void_one_out_non_private_arg_i32_1_use @void_one_out_non_private_arg_i32_1_use.body(i32 addrspace(1)* %val) #0 { ; CHECK-NEXT: ret %void_one_out_non_private_arg_i32_1_use zeroinitializer -; CHECK-LABEL: define void @void_one_out_non_private_arg_i32_1_use(i32 addrspace(1)*) #1 { +; CHECK-LABEL: define void @void_one_out_non_private_arg_i32_1_use(i32 addrspace(1)* %0) #1 { ; CHECK-NEXT: %2 = call %void_one_out_non_private_arg_i32_1_use @void_one_out_non_private_arg_i32_1_use.body(i32 addrspace(1)* undef) ; CHECK-NEXT: %3 = extractvalue %void_one_out_non_private_arg_i32_1_use %2, 0 ; CHECK-NEXT: store i32 %3, i32 addrspace(1)* %0, align 4 @@ -23,7 +23,7 @@ define void @void_one_out_non_private_arg_i32_1_use(i32 addrspace(1)* %val) #0 { ; CHECK-NEXT: %2 = insertvalue %bitcast_pointer_as1 undef, <3 x i32> %1, 0 ; CHECK-NEXT: ret %bitcast_pointer_as1 %2 -; CHECK-LABEL: define void @bitcast_pointer_as1(<3 x i32> addrspace(1)*) #1 { +; CHECK-LABEL: define void @bitcast_pointer_as1(<3 x i32> addrspace(1)* %0) #1 { ; CHECK-NEXT: %2 = call %bitcast_pointer_as1 @bitcast_pointer_as1.body(<3 x i32> addrspace(1)* undef) define void @bitcast_pointer_as1(<3 x i32> addrspace(1)* %out) #0 { %load = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef diff --git a/test/CodeGen/AMDGPU/rewrite-out-arguments.ll b/test/CodeGen/AMDGPU/rewrite-out-arguments.ll index f79bbfb57d4..396f34bbd3b 100644 --- a/test/CodeGen/AMDGPU/rewrite-out-arguments.ll +++ b/test/CodeGen/AMDGPU/rewrite-out-arguments.ll @@ -153,7 +153,7 @@ define void @void_one_out_arg_i32_1_use_align(i32* align 8 %val) #0 { ; CHECK: ret1: ; CHECK-NEXT: ret %void_one_out_arg_i32_2_use { i32 9 } -; CHECK-LABEL: define void @void_one_out_arg_i32_2_use(i1, i32*) #2 { +; CHECK-LABEL: define void @void_one_out_arg_i32_2_use(i1 %0, i32* %1) #2 { ; CHECK-NEXT: %3 = call %void_one_out_arg_i32_2_use @void_one_out_arg_i32_2_use.body(i1 %0, i32* undef) ; CHECK-NEXT: %4 = extractvalue %void_one_out_arg_i32_2_use %3, 0 ; CHECK-NEXT: store i32 %4, i32* %1, align 4 @@ -176,7 +176,7 @@ declare void @may.clobber() ; CHECK-NEXT: store i32 0, i32* %val ; CHECK-NEXT: ret %void_one_out_arg_i32_2_stores { i32 1 } -; CHECK-LABEL: define void @void_one_out_arg_i32_2_stores(i32*) #2 { +; CHECK-LABEL: define void @void_one_out_arg_i32_2_stores(i32* %0) #2 { ; CHECK-NEXT: %2 = call %void_one_out_arg_i32_2_stores @void_one_out_arg_i32_2_stores.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_2_stores %2, 0 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -191,7 +191,7 @@ define void @void_one_out_arg_i32_2_stores(i32* %val) #0 { ; CHECK-NEXT: call void @may.clobber() ; CHECK-NEXT: ret %void_one_out_arg_i32_2_stores_clobber { i32 1 } -; CHECK-LABEL: define void @void_one_out_arg_i32_2_stores_clobber(i32*) #2 { +; CHECK-LABEL: define void @void_one_out_arg_i32_2_stores_clobber(i32* %0) #2 { ; CHECK-NEXT: %2 = call %void_one_out_arg_i32_2_stores_clobber @void_one_out_arg_i32_2_stores_clobber.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_2_stores_clobber %2, 0 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -219,7 +219,7 @@ define void @void_one_out_arg_i32_call_may_clobber(i32* %val) #0 { ; CHECK-NEXT: call void @may.clobber() ; CHECK-NEXT: ret %void_one_out_arg_i32_pre_call_may_clobber zeroinitializer -; CHECK-LABEL: @void_one_out_arg_i32_pre_call_may_clobber(i32*) #2 { +; CHECK-LABEL: @void_one_out_arg_i32_pre_call_may_clobber(i32* %0) #2 { ; CHECK-NEXT: %2 = call %void_one_out_arg_i32_pre_call_may_clobber @void_one_out_arg_i32_pre_call_may_clobber.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_i32_pre_call_may_clobber %2, 0 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -278,7 +278,7 @@ ret1: ; CHECK-LABEL: define private %void_one_out_arg_v2i32_1_use @void_one_out_arg_v2i32_1_use.body(<2 x i32>* %val) #0 { ; CHECK-NEXT: ret %void_one_out_arg_v2i32_1_use { <2 x i32> } -; CHECK-LABEL: define void @void_one_out_arg_v2i32_1_use(<2 x i32>*) #2 { +; CHECK-LABEL: define void @void_one_out_arg_v2i32_1_use(<2 x i32>* %0) #2 { ; CHECK-NEXT: %2 = call %void_one_out_arg_v2i32_1_use @void_one_out_arg_v2i32_1_use.body(<2 x i32>* undef) ; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_v2i32_1_use %2, 0 ; CHECK-NEXT: store <2 x i32> %3, <2 x i32>* %0, align 8 @@ -294,7 +294,7 @@ define void @void_one_out_arg_v2i32_1_use(<2 x i32>* %val) #0 { ; CHECK-NEXT: ret %void_one_out_arg_struct_1_use { %struct { i32 9, i8 99, float 4.000000e+00 } } ; Normally this is split into element accesses which we don't handle. -; CHECK-LABEL: define void @void_one_out_arg_struct_1_use(%struct*) #2 { +; CHECK-LABEL: define void @void_one_out_arg_struct_1_use(%struct* %0) #2 { ; CHECK-NEXT: %2 = call %void_one_out_arg_struct_1_use @void_one_out_arg_struct_1_use.body(%struct* undef) ; CHECK-NEXT: %3 = extractvalue %void_one_out_arg_struct_1_use %2, 0 ; CHECK-NEXT: store %struct %3, %struct* %0, align 4 @@ -307,7 +307,7 @@ define void @void_one_out_arg_struct_1_use(%struct* %out) #0 { ; CHECK-LABEL: define private %i32_one_out_arg_i32_1_use @i32_one_out_arg_i32_1_use.body(i32* %val) #0 { ; CHECK-NEXT: ret %i32_one_out_arg_i32_1_use { i32 9, i32 24 } -; CHECK-LABEL: define i32 @i32_one_out_arg_i32_1_use(i32*) #2 { +; CHECK-LABEL: define i32 @i32_one_out_arg_i32_1_use(i32* %0) #2 { ; CHECK-NEXT: %2 = call %i32_one_out_arg_i32_1_use @i32_one_out_arg_i32_1_use.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %i32_one_out_arg_i32_1_use %2, 1 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -321,7 +321,7 @@ define i32 @i32_one_out_arg_i32_1_use(i32* %val) #0 { ; CHECK-LABEL: define private %unused_different_type @unused_different_type.body(i32* %arg0, float* nocapture %arg1) #0 { ; CHECK-NEXT: ret %unused_different_type { float 4.000000e+00 } -; CHECK-LABEL: define void @unused_different_type(i32*, float* nocapture) #2 { +; CHECK-LABEL: define void @unused_different_type(i32* %0, float* nocapture %1) #2 { ; CHECK-NEXT: %3 = call %unused_different_type @unused_different_type.body(i32* %0, float* undef) ; CHECK-NEXT: %4 = extractvalue %unused_different_type %3, 0 ; CHECK-NEXT: store float %4, float* %1, align 4 @@ -350,7 +350,7 @@ define void @multiple_same_return_noalias(i32* noalias %out0, i32* noalias %out1 ; CHECK-LABEL: define private %multiple_same_return_mayalias @multiple_same_return_mayalias.body(i32* %out0, i32* %out1) #0 { ; CHECK-NEXT: ret %multiple_same_return_mayalias { i32 2, i32 1 } -; CHECK-LABEL: define void @multiple_same_return_mayalias(i32*, i32*) #2 { +; CHECK-LABEL: define void @multiple_same_return_mayalias(i32* %0, i32* %1) #2 { ; CHECK-NEXT: %3 = call %multiple_same_return_mayalias @multiple_same_return_mayalias.body(i32* undef, i32* undef) ; CHECK-NEXT: %4 = extractvalue %multiple_same_return_mayalias %3, 0 ; CHECK-NEXT: store i32 %4, i32* %0, align 4 @@ -366,7 +366,7 @@ define void @multiple_same_return_mayalias(i32* %out0, i32* %out1) #0 { ; CHECK-LABEL: define private %multiple_same_return_mayalias_order @multiple_same_return_mayalias_order.body(i32* %out0, i32* %out1) #0 { ; CHECK-NEXT: ret %multiple_same_return_mayalias_order { i32 1, i32 2 } -; CHECK-LABEL: define void @multiple_same_return_mayalias_order(i32*, i32*) #2 { +; CHECK-LABEL: define void @multiple_same_return_mayalias_order(i32* %0, i32* %1) #2 { ; CHECK-NEXT: %3 = call %multiple_same_return_mayalias_order @multiple_same_return_mayalias_order.body(i32* undef, i32* undef) ; CHECK-NEXT: %4 = extractvalue %multiple_same_return_mayalias_order %3, 0 ; CHECK-NEXT: store i32 %4, i32* %0, align 4 @@ -401,7 +401,7 @@ endif: ; CHECK-LABEL: define private %i1_one_out_arg_i32_1_use @i1_one_out_arg_i32_1_use.body(i32* %val) #0 { ; CHECK-NEXT: ret %i1_one_out_arg_i32_1_use { i1 true, i32 24 } -; CHECK-LABEL: define i1 @i1_one_out_arg_i32_1_use(i32*) #2 { +; CHECK-LABEL: define i1 @i1_one_out_arg_i32_1_use(i32* %0) #2 { ; CHECK: %2 = call %i1_one_out_arg_i32_1_use @i1_one_out_arg_i32_1_use.body(i32* undef) ; CHECK: %3 = extractvalue %i1_one_out_arg_i32_1_use %2, 1 ; CHECK: store i32 %3, i32* %0, align 4 @@ -418,7 +418,7 @@ define i1 @i1_one_out_arg_i32_1_use(i32* %val) #0 { ; CHECK-LABEL: define private %i1_zeroext_one_out_arg_i32_1_use @i1_zeroext_one_out_arg_i32_1_use.body(i32* %val) #0 { ; CHECK-NEXT: ret %i1_zeroext_one_out_arg_i32_1_use { i1 true, i32 24 } -; CHECK-LABEL: define zeroext i1 @i1_zeroext_one_out_arg_i32_1_use(i32*) #2 { +; CHECK-LABEL: define zeroext i1 @i1_zeroext_one_out_arg_i32_1_use(i32* %0) #2 { ; CHECK-NEXT: %2 = call %i1_zeroext_one_out_arg_i32_1_use @i1_zeroext_one_out_arg_i32_1_use.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %i1_zeroext_one_out_arg_i32_1_use %2, 1 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -432,7 +432,7 @@ define zeroext i1 @i1_zeroext_one_out_arg_i32_1_use(i32* %val) #0 { ; CHECK-LABEL: define private %i1_signext_one_out_arg_i32_1_use @i1_signext_one_out_arg_i32_1_use.body(i32* %val) #0 { ; CHECK-NEXT: ret %i1_signext_one_out_arg_i32_1_use { i1 true, i32 24 } -; CHECK-LABEL: define signext i1 @i1_signext_one_out_arg_i32_1_use(i32*) #2 { +; CHECK-LABEL: define signext i1 @i1_signext_one_out_arg_i32_1_use(i32* %0) #2 { ; CHECK-NEXT: %2 = call %i1_signext_one_out_arg_i32_1_use @i1_signext_one_out_arg_i32_1_use.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %i1_signext_one_out_arg_i32_1_use %2, 1 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -446,7 +446,7 @@ define signext i1 @i1_signext_one_out_arg_i32_1_use(i32* %val) #0 { ; CHECK-LABEL: define private %p1i32_noalias_one_out_arg_i32_1_use @p1i32_noalias_one_out_arg_i32_1_use.body(i32* %val) #0 { ; CHECK-NEXT: ret %p1i32_noalias_one_out_arg_i32_1_use { i32 addrspace(1)* null, i32 24 } -; CHECK-LABEL: define noalias i32 addrspace(1)* @p1i32_noalias_one_out_arg_i32_1_use(i32*) #2 { +; CHECK-LABEL: define noalias i32 addrspace(1)* @p1i32_noalias_one_out_arg_i32_1_use(i32* %0) #2 { ; CHECK-NEXT: %2 = call %p1i32_noalias_one_out_arg_i32_1_use @p1i32_noalias_one_out_arg_i32_1_use.body(i32* undef) ; CHECK-NEXT: %3 = extractvalue %p1i32_noalias_one_out_arg_i32_1_use %2, 1 ; CHECK-NEXT: store i32 %3, i32* %0, align 4 @@ -466,7 +466,7 @@ define void @void_one_out_non_private_arg_i32_1_use(i32 addrspace(1)* %val) #0 { } ; CHECK-LABEL: define private %func_ptr_type @func_ptr_type.body(void ()** %out) #0 { -; CHECK-LABEL: define void @func_ptr_type(void ()**) #2 { +; CHECK-LABEL: define void @func_ptr_type(void ()** %0) #2 { ; CHECK: %2 = call %func_ptr_type @func_ptr_type.body(void ()** undef) define void @func_ptr_type(void()** %out) #0 { %func = load void()*, void()** undef @@ -475,7 +475,7 @@ define void @func_ptr_type(void()** %out) #0 { } ; CHECK-LABEL: define private %bitcast_func_ptr_type @bitcast_func_ptr_type.body(void ()** %out) #0 { -; CHECK-LABEL: define void @bitcast_func_ptr_type(void ()**) #2 { +; CHECK-LABEL: define void @bitcast_func_ptr_type(void ()** %0) #2 { define void @bitcast_func_ptr_type(void()** %out) #0 { %func = load i32()*, i32()** undef %cast = bitcast void()** %out to i32()** @@ -486,7 +486,7 @@ define void @bitcast_func_ptr_type(void()** %out) #0 { ; CHECK-LABEL: define private %out_arg_small_array @out_arg_small_array.body([4 x i32]* %val) #0 { ; CHECK-NEXT: ret %out_arg_small_array { [4 x i32] [i32 0, i32 1, i32 2, i32 3] } -; CHECK-LABEL: define void @out_arg_small_array([4 x i32]*) #2 { +; CHECK-LABEL: define void @out_arg_small_array([4 x i32]* %0) #2 { define void @out_arg_small_array([4 x i32]* %val) #0 { store [4 x i32] [i32 0, i32 1, i32 2, i32 3], [4 x i32]* %val ret void @@ -510,7 +510,7 @@ define <16 x i32> @num_regs_return_limit(i32* %out, i32 %val) #0 { } ; CHECK-LABEL: define private %num_regs_reach_limit @num_regs_reach_limit.body(i32* %out, i32 %val) #0 { -; CHECK: define [15 x i32] @num_regs_reach_limit(i32*, i32) #2 { +; CHECK: define [15 x i32] @num_regs_reach_limit(i32* %0, i32 %1) #2 { ; CHECK-NEXT: call %num_regs_reach_limit @num_regs_reach_limit.body(i32* undef, i32 %1) define [15 x i32] @num_regs_reach_limit(i32* %out, i32 %val) #0 { %load = load volatile [15 x i32], [15 x i32] addrspace(1)* undef @@ -526,7 +526,7 @@ define [15 x i32] @num_regs_reach_limit(i32* %out, i32 %val) #0 { ; CHECK-NEXT: %3 = insertvalue %num_regs_reach_limit_leftover %2, i32 %val0, 2 ; CHECK-NEXT: ret %num_regs_reach_limit_leftover %3 -; CHECK-LABEL: define [15 x i32] @num_regs_reach_limit_leftover(i32*, i32*, i32) #2 { +; CHECK-LABEL: define [15 x i32] @num_regs_reach_limit_leftover(i32* %0, i32* %1, i32 %2) #2 { ; CHECK-NEXT: %4 = call %num_regs_reach_limit_leftover @num_regs_reach_limit_leftover.body(i32* undef, i32* undef, i32 %2) ; CHECK-NEXT: %5 = extractvalue %num_regs_reach_limit_leftover %4, 1 ; CHECK-NEXT: store i32 %5, i32* %0, align 4 @@ -547,7 +547,7 @@ define [15 x i32] @num_regs_reach_limit_leftover(i32* %out0, i32* %out1, i32 %va ; CHECK-NEXT: %1 = insertvalue %preserve_debug_info undef, i32 %arg0, 0, !dbg !11 ; CHECK-NEXT: ret %preserve_debug_info %1, !dbg !11 -; CHECK-LABEL: define void @preserve_debug_info(i32, i32*) #2 !dbg !6 { +; CHECK-LABEL: define void @preserve_debug_info(i32 %0, i32* %1) #2 !dbg !6 { ; CHECK-NEXT: %3 = call %preserve_debug_info @preserve_debug_info.body(i32 %0, i32* undef){{$}} ; CHECK-NEXT: %4 = extractvalue %preserve_debug_info %3, 0{{$}} ; CHECK-NEXT: store i32 %4, i32* %1, align 4{{$}} @@ -572,7 +572,7 @@ define void @preserve_metadata(i32 %arg0, i32* %val) #0 !kernel_arg_access_qual ; CHECK-NEXT: %2 = insertvalue %bitcast_pointer_v4i32_v3i32 undef, <3 x i32> %1, 0 ; CHECK-NEXT: ret %bitcast_pointer_v4i32_v3i32 %2 -; CHECK-LABEL: define void @bitcast_pointer_v4i32_v3i32(<3 x i32>*) #2 { +; CHECK-LABEL: define void @bitcast_pointer_v4i32_v3i32(<3 x i32>* %0) #2 { ; CHECK-NEXT: %2 = call %bitcast_pointer_v4i32_v3i32 @bitcast_pointer_v4i32_v3i32.body(<3 x i32>* undef) ; CHECK-NEXT: %3 = extractvalue %bitcast_pointer_v4i32_v3i32 %2, 0 ; CHECK-NEXT: store <3 x i32> %3, <3 x i32>* %0, align 16 @@ -609,7 +609,7 @@ define void @bitcast_pointer_v4i32_v3f32(<3 x float>* %out) #0 { ; CHECK-NEXT: %2 = insertvalue %bitcast_pointer_i32_f32 undef, float %1, 0 ; CHECK-NEXT: ret %bitcast_pointer_i32_f32 %2 -; CHECK-LABEL: define void @bitcast_pointer_i32_f32(float*) #2 { +; CHECK-LABEL: define void @bitcast_pointer_i32_f32(float* %0) #2 { ; CHECK-NEXT: %2 = call %bitcast_pointer_i32_f32 @bitcast_pointer_i32_f32.body(float* undef) ; CHECK-NEXT: %3 = extractvalue %bitcast_pointer_i32_f32 %2, 0 ; CHECK-NEXT: store float %3, float* %0, align 4 @@ -652,7 +652,7 @@ define void @bitcast_pointer_f16_i32(i32* %out) #0 { ; CHECK-NEXT: %3 = insertvalue %bitcast_struct_v3f32_v3f32 undef, %struct.v3f32 %2, 0 ; CHECK-NEXT: ret %bitcast_struct_v3f32_v3f32 %3 -; CHECK-LABEL: define void @bitcast_struct_v3f32_v3f32(%struct.v3f32*, <3 x float>) #2 { +; CHECK-LABEL: define void @bitcast_struct_v3f32_v3f32(%struct.v3f32* %0, <3 x float> %1) #2 { ; CHECK-NEXT: %3 = call %bitcast_struct_v3f32_v3f32 @bitcast_struct_v3f32_v3f32.body(%struct.v3f32* undef, <3 x float> %1) ; CHECK-NEXT: %4 = extractvalue %bitcast_struct_v3f32_v3f32 %3, 0 ; CHECK-NEXT: store %struct.v3f32 %4, %struct.v3f32* %0, align 16 @@ -673,7 +673,7 @@ define void @bitcast_struct_v3f32_v3f32(%struct.v3f32* %out, <3 x float> %value) ; CHECK-NEXT: %4 = insertvalue %bitcast_struct_v3f32_v3i32 undef, %struct.v3f32 %3, 0 ; CHECK-NEXT: ret %bitcast_struct_v3f32_v3i32 %4 -; CHECK-LABEL: define void @bitcast_struct_v3f32_v3i32(%struct.v3f32*, <3 x i32>) #2 { +; CHECK-LABEL: define void @bitcast_struct_v3f32_v3i32(%struct.v3f32* %0, <3 x i32> %1) #2 { ; CHECK-NEXT: %3 = call %bitcast_struct_v3f32_v3i32 @bitcast_struct_v3f32_v3i32.body(%struct.v3f32* undef, <3 x i32> %1) ; CHECK-NEXT: %4 = extractvalue %bitcast_struct_v3f32_v3i32 %3, 0 ; CHECK-NEXT: store %struct.v3f32 %4, %struct.v3f32* %0, align 16 @@ -690,7 +690,7 @@ define void @bitcast_struct_v3f32_v3i32(%struct.v3f32* %out, <3 x i32> %value) # ; CHECK-NEXT: %2 = insertvalue %bitcast_struct_v4f32_v4f32 undef, %struct.v4f32 %1, 0 ; CHECK-NEXT: ret %bitcast_struct_v4f32_v4f32 %2 -; CHECK-LABEL: define void @bitcast_struct_v4f32_v4f32(%struct.v4f32*, <4 x float>) #2 { +; CHECK-LABEL: define void @bitcast_struct_v4f32_v4f32(%struct.v4f32* %0, <4 x float> %1) #2 { ; CHECK-NEXT: %3 = call %bitcast_struct_v4f32_v4f32 @bitcast_struct_v4f32_v4f32.body(%struct.v4f32* undef, <4 x float> %1) define void @bitcast_struct_v4f32_v4f32(%struct.v4f32* %out, <4 x float> %value) #0 { %cast = bitcast %struct.v4f32* %out to <4 x float>* @@ -699,7 +699,7 @@ define void @bitcast_struct_v4f32_v4f32(%struct.v4f32* %out, <4 x float> %value) } ; CHECK-LABEL: define private %bitcast_struct_v3f32_v4i32 @bitcast_struct_v3f32_v4i32.body(%struct.v3f32* %out, <4 x i32> %value) #0 { -; CHECK-LABEL: define void @bitcast_struct_v3f32_v4i32(%struct.v3f32*, <4 x i32>) #2 { +; CHECK-LABEL: define void @bitcast_struct_v3f32_v4i32(%struct.v3f32* %0, <4 x i32> %1) #2 { define void @bitcast_struct_v3f32_v4i32(%struct.v3f32* %out, <4 x i32> %value) #0 { %cast = bitcast %struct.v3f32* %out to <4 x i32>* store <4 x i32> %value, <4 x i32>* %cast, align 16 @@ -707,7 +707,7 @@ define void @bitcast_struct_v3f32_v4i32(%struct.v3f32* %out, <4 x i32> %value) # } ; CHECK-LABEL: define private %bitcast_struct_v4f32_v3f32 @bitcast_struct_v4f32_v3f32.body(%struct.v4f32* %out, <3 x float> %value) #0 { -; CHECK-LABEL: define void @bitcast_struct_v4f32_v3f32(%struct.v4f32*, <3 x float>) #2 { +; CHECK-LABEL: define void @bitcast_struct_v4f32_v3f32(%struct.v4f32* %0, <3 x float> %1) #2 { define void @bitcast_struct_v4f32_v3f32(%struct.v4f32* %out, <3 x float> %value) #0 { %extractVec = shufflevector <3 x float> %value, <3 x float> undef, <4 x i32> %cast = bitcast %struct.v4f32* %out to <4 x float>* @@ -755,7 +755,7 @@ define void @bitcast_struct_i128_v4f32(%struct.i128* %out, <4 x float> %value) # ret void } -; CHECK-LABEL: define void @bitcast_struct_i128_v4f32(%struct.i128*, <4 x float>) #2 { +; CHECK-LABEL: define void @bitcast_struct_i128_v4f32(%struct.i128* %0, <4 x float> %1) #2 { ; CHECK-NEXT: %3 = call %bitcast_struct_i128_v4f32 @bitcast_struct_i128_v4f32.body(%struct.i128* undef, <4 x float> %1) define void @bitcast_array_v4i32_v4f32([4 x i32]* %out, [4 x float] %value) #0 { %cast = bitcast [4 x i32]* %out to [4 x float]* diff --git a/test/CodeGen/WinEH/wineh-comdat.ll b/test/CodeGen/WinEH/wineh-comdat.ll index 5484370a767..2ef1650d29e 100644 --- a/test/CodeGen/WinEH/wineh-comdat.ll +++ b/test/CodeGen/WinEH/wineh-comdat.ll @@ -14,4 +14,4 @@ unwind: declare void @g() declare i32 @__CxxFrameHandler3(...) -; CHECK: define internal i32 @"__ehhandler$f"(i8*, i8*, i8*, i8*){{ .+}} comdat($f) { +; CHECK: define internal i32 @"__ehhandler$f"(i8* %0, i8* %1, i8* %2, i8* %3){{ .+}} comdat($f) { diff --git a/test/CodeGen/X86/win32-eh-available-externally.ll b/test/CodeGen/X86/win32-eh-available-externally.ll index 49da191de97..47eee30bd42 100644 --- a/test/CodeGen/X86/win32-eh-available-externally.ll +++ b/test/CodeGen/X86/win32-eh-available-externally.ll @@ -2,7 +2,7 @@ ; RUN: llc < %s | FileCheck %s --check-prefix=ASM ; IR-NOT: define.*__ehhandler -; IR: define available_externally void @foo(void ()*) +; IR: define available_externally void @foo(void ()* %0) ; IR-NOT: define.*__ehhandler ; No code should be emitted. diff --git a/test/Feature/strip_names.ll b/test/Feature/strip_names.ll index 18c9821544c..e0567179913 100644 --- a/test/Feature/strip_names.ll +++ b/test/Feature/strip_names.ll @@ -10,7 +10,7 @@ ; CHECK: ret i32 %add ; NONAME: @GlobalValueName -; NONAME: @foo(i32) +; NONAME: @foo(i32 %0) ; NONAME-NOT: somelabel: ; NONAME: %2 = load i32, i32* @GlobalValueName ; NONAME: %3 = add i32 %0, %2 diff --git a/test/Instrumentation/DataFlowSanitizer/abilist.ll b/test/Instrumentation/DataFlowSanitizer/abilist.ll index e33237ffe19..497297a5476 100644 --- a/test/Instrumentation/DataFlowSanitizer/abilist.ll +++ b/test/Instrumentation/DataFlowSanitizer/abilist.ll @@ -13,7 +13,7 @@ define i32 @functional(i32 %a, i32 %b) { ret i32 %c } -; CHECK: define i32 (i32, i32)* @discardg(i32) +; CHECK: define i32 (i32, i32)* @discardg(i32 %0) ; CHECK: %[[CALL:.*]] = call { i32 (i32, i32)*, i16 } @"dfs$g"(i32 %0, i16 0) ; CHECK: %[[XVAL:.*]] = extractvalue { i32 (i32, i32)*, i16 } %[[CALL]], 0 ; CHECK: ret {{.*}} %[[XVAL]] @@ -21,7 +21,7 @@ define i32 @functional(i32 %a, i32 %b) { declare void @custom1(i32 %a, i32 %b) -; CHECK: define linkonce_odr { i32, i16 } @"dfsw$custom2"(i32, i32, i16, i16) +; CHECK: define linkonce_odr { i32, i16 } @"dfsw$custom2"(i32 %0, i32 %1, i16 %2, i16 %3) ; CHECK: %[[LABELRETURN2:.*]] = alloca i16 ; CHECK: %[[RV:.*]] = call i32 @__dfsw_custom2 ; CHECK: %[[RVSHADOW:.*]] = load i16, i16* %[[LABELRETURN2]] @@ -30,7 +30,7 @@ declare void @custom1(i32 %a, i32 %b) ; CHECK: ret { i32, i16 } declare i32 @custom2(i32 %a, i32 %b) -; CHECK: define linkonce_odr void @"dfsw$custom3"(i32, i16, i16*, ...) +; CHECK: define linkonce_odr void @"dfsw$custom3"(i32 %0, i16 %1, i16* %2, ...) ; CHECK: call void @__dfsan_vararg_wrapper(i8* ; CHECK: unreachable declare void @custom3(i32 %a, ...) @@ -78,7 +78,7 @@ define i32 (i32, i32)* @g(i32) { ret i32 (i32, i32)* @custom2 } -; CHECK: define { i32, i16 } @"dfs$adiscard"(i32, i32, i16, i16) +; CHECK: define { i32, i16 } @"dfs$adiscard"(i32 %0, i32 %1, i16 %2, i16 %3) ; CHECK: %[[CALL:.*]] = call i32 @discard(i32 %0, i32 %1) ; CHECK: %[[IVAL0:.*]] = insertvalue { i32, i16 } undef, i32 %[[CALL]], 0 ; CHECK: %[[IVAL1:.*]] = insertvalue { i32, i16 } %[[IVAL0]], i16 0, 1 @@ -88,7 +88,7 @@ define i32 (i32, i32)* @g(i32) { ; CHECK: declare void @__dfsw_custom1(i32, i32, i16, i16) ; CHECK: declare i32 @__dfsw_custom2(i32, i32, i16, i16, i16*) -; CHECK-LABEL: define linkonce_odr i32 @"dfst0$customcb"(i32 (i32)*, i32, i16, i16*) +; CHECK-LABEL: define linkonce_odr i32 @"dfst0$customcb"(i32 (i32)* %0, i32 %1, i16 %2, i16* %3) ; CHECK: %[[BC:.*]] = bitcast i32 (i32)* %0 to { i32, i16 } (i32, i16)* ; CHECK: %[[CALL:.*]] = call { i32, i16 } %[[BC]](i32 %1, i16 %2) ; CHECK: %[[XVAL0:.*]] = extractvalue { i32, i16 } %[[CALL]], 0 diff --git a/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll b/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll index 6632eb37927..cc481afa0f1 100644 --- a/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll +++ b/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll @@ -4,7 +4,7 @@ target triple = "x86_64-unknown-linux-gnu" declare i32 @g() -; CHECK: define { i32, i16 } @"dfs$f"(i32, i32, i16, i16) +; CHECK: define { i32, i16 } @"dfs$f"(i32 %0, i32 %1, i16 %2, i16 %3) define i32 @f(i32, i32) { ; CHECK: [[LOCALLABELALLOCA:%.*]] = alloca i16 %i = alloca i32 diff --git a/test/Instrumentation/DataFlowSanitizer/memset.ll b/test/Instrumentation/DataFlowSanitizer/memset.ll index 765a4022b9c..afddead6d58 100644 --- a/test/Instrumentation/DataFlowSanitizer/memset.ll +++ b/test/Instrumentation/DataFlowSanitizer/memset.ll @@ -5,7 +5,7 @@ target triple = "x86_64-unknown-linux-gnu" declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) define void @ms(i8* %p, i8 %v) { - ; CHECK-LABEL: @"dfs$ms"(i8*, i8, i16, i16) + ; CHECK-LABEL: @"dfs$ms"(i8* %0, i8 %1, i16 %2, i16 %3) ; CHECK: call void @__dfsan_set_label(i16 %3, i8* %0, i64 1) call void @llvm.memset.p0i8.i64(i8* %p, i8 %v, i64 1, i1 1) ret void diff --git a/test/LTO/Resolution/X86/comdat.ll b/test/LTO/Resolution/X86/comdat.ll index 14401618498..3a0c673c6a2 100644 --- a/test/LTO/Resolution/X86/comdat.ll +++ b/test/LTO/Resolution/X86/comdat.ll @@ -70,7 +70,7 @@ bb11: ; CHECK-DAG: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}} ; CHECK-DAG: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*) -; CHECK: define weak_odr dso_local i32 @f1(i8*) comdat($c1) { +; CHECK: define weak_odr dso_local i32 @f1(i8* %0) comdat($c1) { ; CHECK-NEXT: bb10: ; CHECK-NEXT: br label %bb11{{$}} ; CHECK: bb11: diff --git a/test/Linker/comdat16.ll b/test/Linker/comdat16.ll index 47b14220785..f7143228dd9 100644 --- a/test/Linker/comdat16.ll +++ b/test/Linker/comdat16.ll @@ -47,7 +47,7 @@ bb11: ; CHECK-DAG: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}} ; CHECK-DAG: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*) -; CHECK: define weak_odr protected i32 @f1(i8*) comdat($c1) { +; CHECK: define weak_odr protected i32 @f1(i8* %0) comdat($c1) { ; CHECK-NEXT: bb10: ; CHECK-NEXT: br label %bb11{{$}} ; CHECK: bb11: diff --git a/test/ThinLTO/X86/linkonce_resolution_comdat.ll b/test/ThinLTO/X86/linkonce_resolution_comdat.ll index c1ffdf176e5..b61caf28417 100644 --- a/test/ThinLTO/X86/linkonce_resolution_comdat.ll +++ b/test/ThinLTO/X86/linkonce_resolution_comdat.ll @@ -10,8 +10,8 @@ ; Copy from first module is prevailing and converted to weak_odr, copy ; from second module is preempted and converted to available_externally and ; removed from comdat. -; IMPORT1: define weak_odr i32 @f(i8*) unnamed_addr comdat($c1) { -; IMPORT2: define available_externally i32 @f(i8*) unnamed_addr { +; IMPORT1: define weak_odr i32 @f(i8* %0) unnamed_addr comdat($c1) { +; IMPORT2: define available_externally i32 @f(i8* %0) unnamed_addr { ; RUN: llvm-nm -o - < %t1.bc.thinlto.o | FileCheck %s --check-prefix=NM1 ; NM1: W f diff --git a/test/Transforms/ArgumentPromotion/X86/thiscall.ll b/test/Transforms/ArgumentPromotion/X86/thiscall.ll index 8e7fd975dde..acc7c9ecf12 100644 --- a/test/Transforms/ArgumentPromotion/X86/thiscall.ll +++ b/test/Transforms/ArgumentPromotion/X86/thiscall.ll @@ -6,7 +6,7 @@ ; RUN: opt -S -argpromotion %s | FileCheck --check-prefix=THIS %s ; RUN: opt -S -globalopt -argpromotion %s | FileCheck --check-prefix=OPT %s ; THIS: define internal x86_thiscallcc void @internalfun(%struct.a* %this, <{ %struct.a -; OPT: define internal fastcc void @internalfun(<{ %struct.a }>*) +; OPT: define internal fastcc void @internalfun(<{ %struct.a }>* %0) target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i386-pc-windows-msvc19.11.0" diff --git a/test/Transforms/ArgumentPromotion/naked_functions.ll b/test/Transforms/ArgumentPromotion/naked_functions.ll index 70a63f4d02e..66600005c0a 100644 --- a/test/Transforms/ArgumentPromotion/naked_functions.ll +++ b/test/Transforms/ArgumentPromotion/naked_functions.ll @@ -18,6 +18,6 @@ entry: unreachable } -; CHECK: define internal i32 @foo(i32*) +; CHECK: define internal i32 @foo(i32* %0) attributes #0 = { naked } diff --git a/test/Transforms/Coroutines/coro-early.ll b/test/Transforms/Coroutines/coro-early.ll index 44e7169254e..0453ecf75ef 100644 --- a/test/Transforms/Coroutines/coro-early.ll +++ b/test/Transforms/Coroutines/coro-early.ll @@ -50,7 +50,7 @@ entry: ret i8* %n } -; CHECK-LABEL: define private fastcc void @NoopCoro.ResumeDestroy(%NoopCoro.Frame*) { +; CHECK-LABEL: define private fastcc void @NoopCoro.ResumeDestroy(%NoopCoro.Frame* %0) { ; CHECK-NEXT: entry ; CHECK-NEXT: ret void diff --git a/test/Transforms/FunctionAttrs/align.ll b/test/Transforms/FunctionAttrs/align.ll index f40e6f254dc..d762d516d9a 100644 --- a/test/Transforms/FunctionAttrs/align.ll +++ b/test/Transforms/FunctionAttrs/align.ll @@ -7,27 +7,27 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ; TEST 1 -; ATTRIBUTOR: define align 8 i32* @test1(i32* returned align 8) -define i32* @test1(i32* align 8) #0 { +; ATTRIBUTOR: define align 8 i32* @test1(i32* returned align 8 %0) +define i32* @test1(i32* align 8 %0) #0 { ret i32* %0 } ; TEST 2 -; ATTRIBUTOR: define i32* @test2(i32* returned) -define i32* @test2(i32*) #0 { +; ATTRIBUTOR: define i32* @test2(i32* returned %0) +define i32* @test2(i32* %0) #0 { ret i32* %0 } ; TEST 3 -; ATTRIBUTOR: define align 4 i32* @test3(i32* align 8, i32* align 4, i1) -define i32* @test3(i32* align 8, i32* align 4, i1) #0 { +; ATTRIBUTOR: define align 4 i32* @test3(i32* align 8 %0, i32* align 4 %1, i1 %2) +define i32* @test3(i32* align 8 %0, i32* align 4 %1, i1 %2) #0 { %ret = select i1 %2, i32* %0, i32* %1 ret i32* %ret } ; TEST 4 -; ATTRIBUTOR: define align 32 i32* @test4(i32* align 32, i32* align 32, i1) -define i32* @test4(i32* align 32, i32* align 32, i1) #0 { +; ATTRIBUTOR: define align 32 i32* @test4(i32* align 32 %0, i32* align 32 %1, i1 %2) +define i32* @test4(i32* align 32 %0, i32* align 32 %1, i1 %2) #0 { %ret = select i1 %2, i32* %0, i32* %1 ret i32* %ret } @@ -82,8 +82,8 @@ define i32* @test6_2() #0 { @a2 = common global i8 0, align 16 ; Function Attrs: nounwind readnone ssp uwtable -define internal i8* @f1(i8* readnone) local_unnamed_addr #0 { -; ATTRIBUTOR: define internal nonnull align 8 i8* @f1(i8* nonnull readnone align 8) +define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 { +; ATTRIBUTOR: define internal nonnull align 8 i8* @f1(i8* nonnull readnone align 8 %0) %2 = icmp eq i8* %0, null br i1 %2, label %3, label %5 @@ -98,8 +98,8 @@ define internal i8* @f1(i8* readnone) local_unnamed_addr #0 { } ; Function Attrs: nounwind readnone ssp uwtable -define internal i8* @f2(i8* readnone) local_unnamed_addr #0 { -; ATTRIBUTOR: define internal nonnull align 8 i8* @f2(i8* nonnull readnone align 8) +define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 { +; ATTRIBUTOR: define internal nonnull align 8 i8* @f2(i8* nonnull readnone align 8 %0) %2 = icmp eq i8* %0, null br i1 %2, label %5, label %3 @@ -120,8 +120,8 @@ define internal i8* @f2(i8* readnone) local_unnamed_addr #0 { } ; Function Attrs: nounwind readnone ssp uwtable -define internal i8* @f3(i8* readnone) local_unnamed_addr #0 { -; ATTRIBUTOR: define internal nonnull align 8 i8* @f3(i8* nonnull readnone align 16) +define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 { +; ATTRIBUTOR: define internal nonnull align 8 i8* @f3(i8* nonnull readnone align 16 %0) %2 = icmp eq i8* %0, null br i1 %2, label %3, label %5 diff --git a/test/Transforms/FunctionAttrs/comdat-ipo.ll b/test/Transforms/FunctionAttrs/comdat-ipo.ll index 2a149e436b6..d2f194facba 100644 --- a/test/Transforms/FunctionAttrs/comdat-ipo.ll +++ b/test/Transforms/FunctionAttrs/comdat-ipo.ll @@ -3,14 +3,14 @@ ; See PR26774 -; CHECK-LABEL: define void @bar(i8* readonly) { +; CHECK-LABEL: define void @bar(i8* readonly %0) { define void @bar(i8* readonly) { call void @foo(i8* %0) ret void } -; CHECK-LABEL: define linkonce_odr void @foo(i8* readonly) { +; CHECK-LABEL: define linkonce_odr void @foo(i8* readonly %0) { define linkonce_odr void @foo(i8* readonly) { call void @bar(i8* %0) ret void diff --git a/test/Transforms/FunctionAttrs/dereferenceable.ll b/test/Transforms/FunctionAttrs/dereferenceable.ll index 16459fc4c42..a9a2c26498a 100644 --- a/test/Transforms/FunctionAttrs/dereferenceable.ll +++ b/test/Transforms/FunctionAttrs/dereferenceable.ll @@ -4,16 +4,16 @@ ; TEST 1 ; take mininimum of return values ; -define i32* @test1(i32* dereferenceable(4), double* dereferenceable(8), i1 zeroext) local_unnamed_addr { -; ATTRIBUTOR: define nonnull dereferenceable(4) i32* @test1(i32* nonnull dereferenceable(4), double* nonnull dereferenceable(8), i1 zeroext) +define i32* @test1(i32* dereferenceable(4) %0, double* dereferenceable(8) %1, i1 zeroext %2) local_unnamed_addr { +; ATTRIBUTOR: define nonnull dereferenceable(4) i32* @test1(i32* nonnull dereferenceable(4) %0, double* nonnull dereferenceable(8) %1, i1 zeroext %2) %4 = bitcast double* %1 to i32* %5 = select i1 %2, i32* %0, i32* %4 ret i32* %5 } ; TEST 2 -define i32* @test2(i32* dereferenceable_or_null(4), double* dereferenceable(8), i1 zeroext) local_unnamed_addr { -; ATTRIBUTOR: define dereferenceable_or_null(4) i32* @test2(i32* dereferenceable_or_null(4), double* nonnull dereferenceable(8), i1 zeroext) +define i32* @test2(i32* dereferenceable_or_null(4) %0, double* dereferenceable(8) %1, i1 zeroext %2) local_unnamed_addr { +; ATTRIBUTOR: define dereferenceable_or_null(4) i32* @test2(i32* dereferenceable_or_null(4) %0, double* nonnull dereferenceable(8) %1, i1 zeroext %2) %4 = bitcast double* %1 to i32* %5 = select i1 %2, i32* %0, i32* %4 ret i32* %5 @@ -21,21 +21,21 @@ define i32* @test2(i32* dereferenceable_or_null(4), double* dereferenceable(8), ; TEST 3 ; GEP inbounds -define i32* @test3_1(i32* dereferenceable(8)) local_unnamed_addr { -; ATTRIBUTOR: define nonnull dereferenceable(4) i32* @test3_1(i32* nonnull dereferenceable(8)) +define i32* @test3_1(i32* dereferenceable(8) %0) local_unnamed_addr { +; ATTRIBUTOR: define nonnull dereferenceable(4) i32* @test3_1(i32* nonnull dereferenceable(8) %0) %ret = getelementptr inbounds i32, i32* %0, i64 1 ret i32* %ret } -define i32* @test3_2(i32* dereferenceable_or_null(32)) local_unnamed_addr { +define i32* @test3_2(i32* dereferenceable_or_null(32) %0) local_unnamed_addr { ; FIXME: Argument should be mark dereferenceable because of GEP `inbounds`. -; ATTRIBUTOR: define nonnull dereferenceable(16) i32* @test3_2(i32* dereferenceable_or_null(32)) +; ATTRIBUTOR: define nonnull dereferenceable(16) i32* @test3_2(i32* dereferenceable_or_null(32) %0) %ret = getelementptr inbounds i32, i32* %0, i64 4 ret i32* %ret } -define i32* @test3_3(i32* dereferenceable(8), i32* dereferenceable(16), i1) local_unnamed_addr { -; ATTRIBUTOR: define nonnull dereferenceable(4) i32* @test3_3(i32* nonnull dereferenceable(8), i32* nonnull dereferenceable(16), i1) local_unnamed_addr +define i32* @test3_3(i32* dereferenceable(8) %0, i32* dereferenceable(16) %1, i1 %2) local_unnamed_addr { +; ATTRIBUTOR: define nonnull dereferenceable(4) i32* @test3_3(i32* nonnull dereferenceable(8) %0, i32* nonnull dereferenceable(16) %1, i1 %2) local_unnamed_addr %ret1 = getelementptr inbounds i32, i32* %0, i64 1 %ret2 = getelementptr inbounds i32, i32* %1, i64 2 %ret = select i1 %2, i32* %ret1, i32* %ret2 @@ -45,8 +45,8 @@ define i32* @test3_3(i32* dereferenceable(8), i32* dereferenceable(16), i1) loca ; TEST 4 ; Better than known in IR. -define dereferenceable(4) i32* @test4(i32* dereferenceable(8)) local_unnamed_addr { -; ATTRIBUTOR: define nonnull dereferenceable(8) i32* @test4(i32* nonnull returned dereferenceable(8)) +define dereferenceable(4) i32* @test4(i32* dereferenceable(8) %0) local_unnamed_addr { +; ATTRIBUTOR: define nonnull dereferenceable(8) i32* @test4(i32* nonnull returned dereferenceable(8) %0) ret i32* %0 } diff --git a/test/Transforms/FunctionAttrs/liveness.ll b/test/Transforms/FunctionAttrs/liveness.ll index 42ef89cfe8a..ce42506ae48 100644 --- a/test/Transforms/FunctionAttrs/liveness.ll +++ b/test/Transforms/FunctionAttrs/liveness.ll @@ -17,7 +17,7 @@ define i32 @volatile_load(i32*) norecurse nounwind uwtable { } ; CHECK: Function Attrs: nofree norecurse nosync nounwind uwtable willreturn -; CHECK-NEXT: define internal i32 @internal_load(i32* nonnull) +; CHECK-NEXT: define internal i32 @internal_load(i32* nonnull %0) define internal i32 @internal_load(i32*) norecurse nounwind uwtable { %2 = load i32, i32* %0, align 4 ret i32 %2 diff --git a/test/Transforms/FunctionAttrs/naked_functions.ll b/test/Transforms/FunctionAttrs/naked_functions.ll index d34dc0c20d9..c4996d4e7e9 100644 --- a/test/Transforms/FunctionAttrs/naked_functions.ll +++ b/test/Transforms/FunctionAttrs/naked_functions.ll @@ -20,6 +20,6 @@ entry: unreachable } -; CHECK: define internal i32 @foo(i32*) +; CHECK: define internal i32 @foo(i32* %0) attributes #0 = { naked } diff --git a/test/Transforms/FunctionAttrs/noalias_returned.ll b/test/Transforms/FunctionAttrs/noalias_returned.ll index 1b20946ebfe..2cffec7f2e7 100644 --- a/test/Transforms/FunctionAttrs/noalias_returned.ll +++ b/test/Transforms/FunctionAttrs/noalias_returned.ll @@ -60,8 +60,8 @@ define i8* @bar() nounwind uwtable { ret i8* %1 } -; CHECK: define noalias i8* @foo1(i32) -define i8* @foo1(i32) nounwind uwtable { +; CHECK: define noalias i8* @foo1(i32 %0) +define i8* @foo1(i32 %0) nounwind uwtable { %2 = icmp eq i32 %0, 0 br i1 %2, label %5, label %3 @@ -125,8 +125,8 @@ return: ; TEST 8 -; CHECK: define noalias i8* @test8(i32*) -define i8* @test8(i32*) nounwind uwtable { +; CHECK: define noalias i8* @test8(i32* %0) +define i8* @test8(i32* %0) nounwind uwtable { %2 = tail call noalias i8* @malloc(i64 4) %3 = icmp ne i32* %0, null br i1 %3, label %4, label %5 diff --git a/test/Transforms/FunctionAttrs/nofree-attributor.ll b/test/Transforms/FunctionAttrs/nofree-attributor.ll index 16364b5a51f..ceb49d4a347 100644 --- a/test/Transforms/FunctionAttrs/nofree-attributor.ll +++ b/test/Transforms/FunctionAttrs/nofree-attributor.ll @@ -29,11 +29,11 @@ define void @only_return() #0 { ; } ; FNATTR: Function Attrs: noinline nounwind uwtable -; FNATTR-NEXT: define void @only_free(i8* nocapture) local_unnamed_addr +; FNATTR-NEXT: define void @only_free(i8* nocapture %0) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable ; ATTRIBUTOR-NOT: nofree -; ATTRIBUTOR-NEXT: define void @only_free(i8* nocapture) local_unnamed_addr #1 -define void @only_free(i8* nocapture) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define void @only_free(i8* nocapture %0) local_unnamed_addr #1 +define void @only_free(i8* nocapture %0) local_unnamed_addr #0 { tail call void @free(i8* %0) #1 ret void } @@ -51,22 +51,22 @@ define void @only_free(i8* nocapture) local_unnamed_addr #0 { ; FNATTR: Function Attrs: noinline nounwind uwtable -; FNATTR-NEXT: define void @free_in_scc1(i8* nocapture) local_unnamed_addr +; FNATTR-NEXT: define void @free_in_scc1(i8* nocapture %0) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable ; ATTRIBUTOR-NOT: nofree -; ATTRIBUTOR-NEXT :define void @free_in_scc1(i8* nocapture) local_unnamed_addr -define void @free_in_scc1(i8* nocapture) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT :define void @free_in_scc1(i8* nocapture %0) local_unnamed_addr +define void @free_in_scc1(i8* nocapture %0) local_unnamed_addr #0 { tail call void @free_in_scc2(i8* %0) #1 ret void } ; FNATTR: Function Attrs: noinline nounwind uwtable -; FNATTR-NEXT: define void @free_in_scc2(i8* nocapture) local_unnamed_addr +; FNATTR-NEXT: define void @free_in_scc2(i8* nocapture %0) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable ; ATTRIBUTOR-NOT: nofree -; ATTRIBUTOR: define void @free_in_scc2(i8* nocapture) local_unnamed_addr -define void @free_in_scc2(i8* nocapture) local_unnamed_addr #0 { +; ATTRIBUTOR: define void @free_in_scc2(i8* nocapture %0) local_unnamed_addr +define void @free_in_scc2(i8* nocapture %0) local_unnamed_addr #0 { tail call void @free_in_scc1(i8* %0) tail call void @free(i8* %0) #1 ret void @@ -109,11 +109,11 @@ define void @mutual_recursion2() #0 { ; } ; FNATTR: Function Attrs: noinline nounwind uwtable -; FNATTR-NEXT: define void @_Z9delete_opPc(i8*) local_unnamed_addr +; FNATTR-NEXT: define void @_Z9delete_opPc(i8* %0) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable ; ATTRIBUTOR-NOT: nofree -; ATTRIBUTOR-NEXT: define void @_Z9delete_opPc(i8*) local_unnamed_addr #1 -define void @_Z9delete_opPc(i8*) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define void @_Z9delete_opPc(i8* %0) local_unnamed_addr #1 +define void @_Z9delete_opPc(i8* %0) local_unnamed_addr #0 { %2 = icmp eq i8* %0, null br i1 %2, label %4, label %3 @@ -129,11 +129,11 @@ define void @_Z9delete_opPc(i8*) local_unnamed_addr #0 { ; TEST 6 (negative case) ; Call realloc ; FNATTR: Function Attrs: noinline nounwind uwtable -; FNATTR-NEXT: define noalias i8* @call_realloc(i8* nocapture, i64) local_unnamed_addr +; FNATTR-NEXT: define noalias i8* @call_realloc(i8* nocapture %0, i64 %1) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable ; ATTRIBUTOR-NOT: nofree -; ATTRIBUTOR-NEXT: define noalias i8* @call_realloc(i8* nocapture, i64) local_unnamed_addr -define noalias i8* @call_realloc(i8* nocapture, i64) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define noalias i8* @call_realloc(i8* nocapture %0, i64 %1) local_unnamed_addr +define noalias i8* @call_realloc(i8* nocapture %0, i64 %1) local_unnamed_addr #0 { %ret = tail call i8* @realloc(i8* %0, i64 %1) #2 ret i8* %ret } @@ -196,7 +196,7 @@ define void @call_both() #0 { ; TEST 10 (positive case) ; Call intrinsic function ; FNATTRS: Function Attrs: noinline readnone speculatable -; FNATTRS-NEXT: declare float @llvm.floor.f32(float) +; FNATTRS-NEXT: declare float @llvm.floor.f32(float %0) ; ATTRIBUTOR: Function Attrs: nounwind readnone speculatable ; ATTRIBUTOR-NEXT: declare float @llvm.floor.f32(float) declare float @llvm.floor.f32(float) diff --git a/test/Transforms/FunctionAttrs/nosync.ll b/test/Transforms/FunctionAttrs/nosync.ll index 0769a1744ab..1d7f46af203 100644 --- a/test/Transforms/FunctionAttrs/nosync.ll +++ b/test/Transforms/FunctionAttrs/nosync.ll @@ -43,10 +43,10 @@ entry: ; } ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define i32 @load_monotonic(i32* nocapture readonly) +; FNATTR-NEXT: define i32 @load_monotonic(i32* nocapture readonly %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nosync nounwind uwtable -; ATTRIBUTOR-NEXT: define i32 @load_monotonic(i32* nocapture readonly) -define i32 @load_monotonic(i32* nocapture readonly) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define i32 @load_monotonic(i32* nocapture readonly %0) +define i32 @load_monotonic(i32* nocapture readonly %0) norecurse nounwind uwtable { %2 = load atomic i32, i32* %0 monotonic, align 4 ret i32 %2 } @@ -59,10 +59,10 @@ define i32 @load_monotonic(i32* nocapture readonly) norecurse nounwind uwtable { ; } ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define void @store_monotonic(i32* nocapture) +; FNATTR-NEXT: define void @store_monotonic(i32* nocapture %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nosync nounwind uwtable -; ATTRIBUTOR-NEXT: define void @store_monotonic(i32* nocapture) -define void @store_monotonic(i32* nocapture) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define void @store_monotonic(i32* nocapture %0) +define void @store_monotonic(i32* nocapture %0) norecurse nounwind uwtable { store atomic i32 10, i32* %0 monotonic, align 4 ret void } @@ -75,11 +75,11 @@ define void @store_monotonic(i32* nocapture) norecurse nounwind uwtable { ; } ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define i32 @load_acquire(i32* nocapture readonly) +; FNATTR-NEXT: define i32 @load_acquire(i32* nocapture readonly %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define i32 @load_acquire(i32* nocapture readonly) -define i32 @load_acquire(i32* nocapture readonly) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define i32 @load_acquire(i32* nocapture readonly %0) +define i32 @load_acquire(i32* nocapture readonly %0) norecurse nounwind uwtable { %2 = load atomic i32, i32* %0 acquire, align 4 ret i32 %2 } @@ -91,11 +91,11 @@ define i32 @load_acquire(i32* nocapture readonly) norecurse nounwind uwtable { ; } ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define void @load_release(i32* nocapture) +; FNATTR-NEXT: define void @load_release(i32* nocapture %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define void @load_release(i32* nocapture) -define void @load_release(i32* nocapture) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define void @load_release(i32* nocapture %0) +define void @load_release(i32* nocapture %0) norecurse nounwind uwtable { store atomic volatile i32 10, i32* %0 release, align 4 ret void } @@ -103,11 +103,11 @@ define void @load_release(i32* nocapture) norecurse nounwind uwtable { ; TEST 6 - negative volatile, relaxed atomic ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define void @load_volatile_release(i32* nocapture) +; FNATTR-NEXT: define void @load_volatile_release(i32* nocapture %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define void @load_volatile_release(i32* nocapture) -define void @load_volatile_release(i32* nocapture) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define void @load_volatile_release(i32* nocapture %0) +define void @load_volatile_release(i32* nocapture %0) norecurse nounwind uwtable { store atomic volatile i32 10, i32* %0 release, align 4 ret void } @@ -119,11 +119,11 @@ define void @load_volatile_release(i32* nocapture) norecurse nounwind uwtable { ; } ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define void @volatile_store(i32*) +; FNATTR-NEXT: define void @volatile_store(i32* %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define void @volatile_store(i32*) -define void @volatile_store(i32*) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define void @volatile_store(i32* %0) +define void @volatile_store(i32* %0) norecurse nounwind uwtable { store volatile i32 14, i32* %0, align 4 ret void } @@ -136,11 +136,11 @@ define void @volatile_store(i32*) norecurse nounwind uwtable { ; } ; FNATTR: Function Attrs: nofree norecurse nounwind uwtable -; FNATTR-NEXT: define i32 @volatile_load(i32*) +; FNATTR-NEXT: define i32 @volatile_load(i32* %0) ; ATTRIBUTOR: Function Attrs: nofree norecurse nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define i32 @volatile_load(i32*) -define i32 @volatile_load(i32*) norecurse nounwind uwtable { +; ATTRIBUTOR-NEXT: define i32 @volatile_load(i32* %0) +define i32 @volatile_load(i32* %0) norecurse nounwind uwtable { %2 = load volatile i32, i32* %0, align 4 ret i32 %2 } @@ -184,22 +184,22 @@ define void @call_might_sync() nounwind uwtable noinline { ; volatile operation in same scc. Call volatile_load defined in TEST 8. ; FNATTR: Function Attrs: nofree noinline nounwind uwtable -; FNATTR-NEXT: define i32 @scc1(i32*) +; FNATTR-NEXT: define i32 @scc1(i32* %0) ; ATTRIBUTOR: Function Attrs: nofree noinline nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define i32 @scc1(i32*) -define i32 @scc1(i32*) noinline nounwind uwtable { +; ATTRIBUTOR-NEXT: define i32 @scc1(i32* %0) +define i32 @scc1(i32* %0) noinline nounwind uwtable { tail call void @scc2(i32* %0); %val = tail call i32 @volatile_load(i32* %0); ret i32 %val; } ; FNATTR: Function Attrs: nofree noinline nounwind uwtable -; FNATTR-NEXT: define void @scc2(i32*) +; FNATTR-NEXT: define void @scc2(i32* %0) ; ATTRIBUTOR: Function Attrs: nofree noinline nounwind uwtable ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR-NEXT: define void @scc2(i32*) -define void @scc2(i32*) noinline nounwind uwtable { +; ATTRIBUTOR-NEXT: define void @scc2(i32* %0) +define void @scc2(i32* %0) noinline nounwind uwtable { tail call i32 @scc1(i32* %0); ret void; } @@ -224,10 +224,10 @@ define void @scc2(i32*) noinline nounwind uwtable { %"struct.std::__atomic_base" = type { i8 } ; FNATTR: Function Attrs: nofree norecurse nounwind -; FNATTR-NEXT: define void @foo1(i32* nocapture, %"struct.std::atomic"* nocapture) +; FNATTR-NEXT: define void @foo1(i32* nocapture %0, %"struct.std::atomic"* nocapture %1) ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR: define void @foo1(i32*, %"struct.std::atomic"*) -define void @foo1(i32*, %"struct.std::atomic"*) { +; ATTRIBUTOR: define void @foo1(i32* %0, %"struct.std::atomic"* %1) +define void @foo1(i32* %0, %"struct.std::atomic"* %1) { store i32 100, i32* %0, align 4 fence release %3 = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* %1, i64 0, i32 0, i32 0 @@ -236,10 +236,10 @@ define void @foo1(i32*, %"struct.std::atomic"*) { } ; FNATTR: Function Attrs: nofree norecurse nounwind -; FNATTR-NEXT: define void @bar(i32* nocapture readnone, %"struct.std::atomic"* nocapture readonly) +; FNATTR-NEXT: define void @bar(i32* nocapture readnone %0, %"struct.std::atomic"* nocapture readonly %1) ; ATTRIBUTOR-NOT: nosync -; ATTRIBUTOR: define void @bar(i32*, %"struct.std::atomic"*) -define void @bar(i32 *, %"struct.std::atomic"*) { +; ATTRIBUTOR: define void @bar(i32* %0, %"struct.std::atomic"* %1) +define void @bar(i32* %0, %"struct.std::atomic"* %1) { %3 = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* %1, i64 0, i32 0, i32 0 br label %4 @@ -256,10 +256,10 @@ define void @bar(i32 *, %"struct.std::atomic"*) { ; TEST 13 - Fence syncscope("singlethread") seq_cst ; FNATTR: Function Attrs: nofree norecurse nounwind -; FNATTR-NEXT: define void @foo1_singlethread(i32* nocapture, %"struct.std::atomic"* nocapture) +; FNATTR-NEXT: define void @foo1_singlethread(i32* nocapture %0, %"struct.std::atomic"* nocapture %1) ; ATTRIBUTOR: Function Attrs: nofree nosync -; ATTRIBUTOR: define void @foo1_singlethread(i32*, %"struct.std::atomic"*) -define void @foo1_singlethread(i32*, %"struct.std::atomic"*) { +; ATTRIBUTOR: define void @foo1_singlethread(i32* %0, %"struct.std::atomic"* %1) +define void @foo1_singlethread(i32* %0, %"struct.std::atomic"* %1) { store i32 100, i32* %0, align 4 fence syncscope("singlethread") release %3 = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* %1, i64 0, i32 0, i32 0 @@ -268,10 +268,10 @@ define void @foo1_singlethread(i32*, %"struct.std::atomic"*) { } ; FNATTR: Function Attrs: nofree norecurse nounwind -; FNATTR-NEXT: define void @bar_singlethread(i32* nocapture readnone, %"struct.std::atomic"* nocapture readonly) +; FNATTR-NEXT: define void @bar_singlethread(i32* nocapture readnone %0, %"struct.std::atomic"* nocapture readonly %1) ; ATTRIBUTOR: Function Attrs: nofree nosync -; ATTRIBUTOR: define void @bar_singlethread(i32*, %"struct.std::atomic"*) -define void @bar_singlethread(i32 *, %"struct.std::atomic"*) { +; ATTRIBUTOR: define void @bar_singlethread(i32* %0, %"struct.std::atomic"* %1) +define void @bar_singlethread(i32* %0, %"struct.std::atomic"* %1) { %3 = getelementptr inbounds %"struct.std::atomic", %"struct.std::atomic"* %1, i64 0, i32 0, i32 0 br label %4 diff --git a/test/Transforms/FunctionAttrs/nounwind.ll b/test/Transforms/FunctionAttrs/nounwind.ll index 1625d12e91e..fa2dddd31ae 100644 --- a/test/Transforms/FunctionAttrs/nounwind.ll +++ b/test/Transforms/FunctionAttrs/nounwind.ll @@ -50,9 +50,9 @@ define void @call_non_nounwind(){ ; return -1; ; } -; CHECK: define i32 @maybe_throw(i1 zeroext) -; ATTRIBUTOR: define i32 @maybe_throw(i1 zeroext) -define i32 @maybe_throw(i1 zeroext) { +; CHECK: define i32 @maybe_throw(i1 zeroext %0) +; ATTRIBUTOR: define i32 @maybe_throw(i1 zeroext %0) +define i32 @maybe_throw(i1 zeroext %0) { br i1 %0, label %2, label %3 2: ; preds = %1 diff --git a/test/Transforms/FunctionAttrs/readnone.ll b/test/Transforms/FunctionAttrs/readnone.ll index b5a5b30ae21..b18aab539b6 100644 --- a/test/Transforms/FunctionAttrs/readnone.ll +++ b/test/Transforms/FunctionAttrs/readnone.ll @@ -1,14 +1,14 @@ ; RUN: opt < %s -functionattrs -S | FileCheck %s ; RUN: opt < %s -passes=function-attrs -S | FileCheck %s -; CHECK: define void @bar(i8* nocapture readnone) -define void @bar(i8* readonly) { +; CHECK: define void @bar(i8* nocapture readnone %0) +define void @bar(i8* readonly %0) { call void @foo(i8* %0) ret void } -; CHECK: define void @foo(i8* nocapture readnone) -define void @foo(i8* readonly) { +; CHECK: define void @foo(i8* nocapture readnone %0) +define void @foo(i8* readonly %0) { call void @bar(i8* %0) ret void } diff --git a/test/Transforms/FunctionAttrs/willreturn.ll b/test/Transforms/FunctionAttrs/willreturn.ll index eb1dbb1342c..6d7d35a5108 100644 --- a/test/Transforms/FunctionAttrs/willreturn.ll +++ b/test/Transforms/FunctionAttrs/willreturn.ll @@ -26,11 +26,11 @@ define void @only_return() #0 { ; } ; FNATTR: Function Attrs: noinline nounwind readnone uwtable -; FNATTR-NEXT: define i32 @fib(i32) +; FNATTR-NEXT: define i32 @fib(i32 %0) ; FIXME: missing willreturn ; ATTRIBUTOR: Function Attrs: nofree noinline nosync nounwind uwtable -; ATTRIBUTOR-NEXT: define i32 @fib(i32) local_unnamed_addr -define i32 @fib(i32) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define i32 @fib(i32 %0) local_unnamed_addr +define i32 @fib(i32 %0) local_unnamed_addr #0 { %2 = icmp slt i32 %0, 2 br i1 %2, label %9, label %3 @@ -58,11 +58,11 @@ define i32 @fib(i32) local_unnamed_addr #0 { ; FNATTR: Function Attrs: noinline norecurse nounwind readnone uwtable ; FNATTR-NOT: willreturn -; FNATTR-NEXT: define i32 @fact_maybe_not_halt(i32) local_unnamed_addr +; FNATTR-NEXT: define i32 @fact_maybe_not_halt(i32 %0) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: nofree noinline nosync nounwind uwtable ; ATTRIBUTOR-NOT: willreturn -; ATTRIBUTOR-NEXT: define i32 @fact_maybe_not_halt(i32) local_unnamed_addr -define i32 @fact_maybe_not_halt(i32) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define i32 @fact_maybe_not_halt(i32 %0) local_unnamed_addr +define i32 @fact_maybe_not_halt(i32 %0) local_unnamed_addr #0 { %2 = icmp eq i32 %0, 0 br i1 %2, label %11, label %3 @@ -94,10 +94,10 @@ define i32 @fact_maybe_not_halt(i32) local_unnamed_addr #0 { ; FIXME: missing willreturn ; FNATTR: Function Attrs: noinline norecurse nounwind readnone uwtable -; FNATTR-NEXT: define i32 @fact_loop(i32) +; FNATTR-NEXT: define i32 @fact_loop(i32 %0) ; ATTRIBUTOR: Function Attrs: nofree noinline nosync nounwind uwtable -; ATTRIBUTOR-NEXT: define i32 @fact_loop(i32) local_unnamed_addr -define i32 @fact_loop(i32) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define i32 @fact_loop(i32 %0) local_unnamed_addr +define i32 @fact_loop(i32 %0) local_unnamed_addr #0 { %2 = icmp slt i32 %0, 1 br i1 %2, label %3, label %5 @@ -153,7 +153,7 @@ define void @mutual_recursion2() #0 { ; FNATTR-NEXT: declare void @exit(i32) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noreturn ; ATTRIBUTOR-NEXT: declare void @exit(i32) local_unnamed_add -declare void @exit(i32) local_unnamed_addr noreturn +declare void @exit(i32 %0) local_unnamed_addr noreturn ; FNATTR: Function Attrs: noinline nounwind uwtable ; FNATTR-NOT: willreturn @@ -178,11 +178,11 @@ define void @only_exit() local_unnamed_addr #0 { ; } ; FNATTR: Function Attrs: noinline nounwind uwtable ; FNATTR-NOT: willreturn -; FNATTR-NEXT: define void @conditional_exit(i32, i32* nocapture readonly) local_unnamed_addr +; FNATTR-NEXT: define void @conditional_exit(i32 %0, i32* nocapture readonly %1) local_unnamed_addr ; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable ; ATTRIBUTOR-NOT: willreturn -; ATTRIBUTOR-NEXT: define void @conditional_exit(i32, i32* nocapture readonly) local_unnamed_addr -define void @conditional_exit(i32, i32* nocapture readonly) local_unnamed_addr #0 { +; ATTRIBUTOR-NEXT: define void @conditional_exit(i32 %0, i32* nocapture readonly %1) local_unnamed_addr +define void @conditional_exit(i32 %0, i32* nocapture readonly %1) local_unnamed_addr #0 { %3 = icmp eq i32 %0, 0 br i1 %3, label %5, label %4 @@ -207,7 +207,7 @@ define void @conditional_exit(i32, i32* nocapture readonly) local_unnamed_addr # ; Call intrinsic function ; FIXME: missing willreturn ; FNATTRS: Function Attrs: noinline readnone speculatable -; FNATTRS-NEXT: declare float @llvm.floor.f32(float) +; FNATTRS-NEXT: declare float @llvm.floor.f32(float %0) ; ATTRIBUTOR: Function Attrs: nounwind readnone speculatable ; ATTRIBUTOR-NEXT: declare float @llvm.floor.f32(float) declare float @llvm.floor.f32(float) @@ -335,10 +335,10 @@ declare i32 @__gxx_personality_v0(...) ; FIXME: missing willreturn ; FNATTR: Function Attrs: noinline norecurse nounwind readonly uwtable -; FNATTR-NEXT: define i32 @loop_constant_trip_count(i32* nocapture readonly) +; FNATTR-NEXT: define i32 @loop_constant_trip_count(i32* nocapture readonly %0) ; ATTRIBUTOR: Function Attrs: nofree noinline nosync nounwind uwtable -; ATTRIBUTOR-NEXT: define i32 @loop_constant_trip_count(i32* nocapture readonly) -define i32 @loop_constant_trip_count(i32* nocapture readonly) #0 { +; ATTRIBUTOR-NEXT: define i32 @loop_constant_trip_count(i32* nocapture readonly %0) +define i32 @loop_constant_trip_count(i32* nocapture readonly %0) #0 { br label %3 ;