reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -disable-simplify-libcalls -codegenprepare < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"

; This is a workaround for PR23093: when building with -mkernel/-fno-builtin,
; we still generate fortified library calls.

; Check that we ignore two things:
; - attribute nobuiltin
; - TLI::has (always returns false thanks to -disable-simplify-libcalls)

define void @test_nobuiltin(i8* %dst, i64 %len) {
; CHECK-LABEL: @test_nobuiltin(
; CHECK-NEXT:    call void @llvm.memset.p0i8.i64(i8* [[DST:%.*]], i8 0, i64 [[LEN:%.*]], i1 false) #1
; CHECK-NEXT:    ret void
;
  call i8* @__memset_chk(i8* %dst, i32 0, i64 %len, i64 -1) nobuiltin
  ret void
}

declare i8* @__memset_chk(i8*, i32, i64, i64)