@@ -743,6 +743,30 @@ let calls_wrapper(f, types) = any(only(code_typed(f, types))[1].code) do stmt
743743 @test ! calls_wrapper (memmove!,
744744 Tuple{IRBuilder, Value, Integer, Value, Integer, Value})
745745 end
746+ indices = AbstractVector{<: Integer }
747+ @test ! calls_wrapper (extract_value!, Tuple{IRBuilder, Value, indices, AbstractString})
748+ @test ! calls_wrapper (insert_value!,
749+ Tuple{IRBuilder, Value, Value, indices, AbstractString})
750+
751+ # methods with keyword arguments are compiled for the keyword arguments' declared types
752+ kwbody (f, types) = Base. bodyfunction (which (f, types))
753+ @test ! calls_wrapper (kwbody (alloca!, Tuple{IRBuilder, LLVMType, AbstractString}),
754+ Tuple{Any, Any, typeof (alloca!), IRBuilder, LLVMType,
755+ AbstractString})
756+ @test ! calls_wrapper (kwbody (array_alloca!,
757+ Tuple{IRBuilder, LLVMType, Value, AbstractString}),
758+ Tuple{Any, Any, typeof (array_alloca!), IRBuilder, LLVMType,
759+ Value, AbstractString})
760+ @test ! calls_wrapper (kwbody (globalstring!,
761+ Tuple{LLVM. Module, AbstractString, AbstractString}),
762+ Tuple{Union{Nothing, Integer}, Bool, typeof (globalstring!),
763+ LLVM. Module, AbstractString, AbstractString})
764+
765+ # documented wrappers are inlined too
766+ @test ! calls_wrapper (intcast!, Tuple{IRBuilder, Value, LLVMType, AbstractString})
767+ @test ! calls_wrapper (LLVM. Interop. _generate_llvmcall,
768+ Tuple{Any, Any, Any, Vector{Any}, String,
769+ Union{Nothing, Vector{Any}}})
746770end
747771
748772end
0 commit comments