1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -mtriple=x86_64 -disable-simplify-libcalls -codegenprepare < %s | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
5 ; This is a workaround for PR23093: when building with -mkernel/-fno-builtin,
6 ; we still generate fortified library calls.
8 ; Check that we ignore two things:
9 ; - attribute nobuiltin
10 ; - TLI::has (always returns false thanks to -disable-simplify-libcalls)
12 define void @test_nobuiltin(ptr %dst, i64 %len) {
13 ; CHECK-LABEL: @test_nobuiltin(
14 ; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[DST:%.*]], i8 0, i64 [[LEN:%.*]], i1 false)
15 ; CHECK-NEXT: ret void
17 call ptr @__memset_chk(ptr %dst, i32 0, i64 %len, i64 -1) nobuiltin
21 declare ptr @__memset_chk(ptr, i32, i64, i64)