1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu | FileCheck %s
4 declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) nounwind
5 declare void @llvm.memset.inline.p0.i64(ptr nocapture, i8, i64, i1) nounwind
7 define void @test1(ptr %a, i8 %value) nounwind {
10 ; CHECK-NEXT: // kill: def $w1 killed $w1 def $x1
11 ; CHECK-NEXT: mov x8, #72340172838076673
12 ; CHECK-NEXT: and x9, x1, #0xff
13 ; CHECK-NEXT: mul x8, x9, x8
14 ; CHECK-NEXT: str x8, [x0]
16 tail call void @llvm.memset.inline.p0.i64(ptr %a, i8 %value, i64 8, i1 0)
20 define void @regular_memset_calls_external_function(ptr %a, i8 %value) nounwind {
21 ; CHECK-LABEL: regular_memset_calls_external_function:
23 ; CHECK-NEXT: mov w2, #1024
24 ; CHECK-NEXT: b memset
25 tail call void @llvm.memset.p0.i64(ptr %a, i8 %value, i64 1024, i1 0)
29 define void @inlined_set_doesnt_call_external_function(ptr %a, i8 %value) nounwind {
30 ; CHECK-LABEL: inlined_set_doesnt_call_external_function:
32 ; CHECK-NEXT: dup v0.16b, w1
33 ; CHECK-NEXT: stp q0, q0, [x0]
34 ; CHECK-NEXT: stp q0, q0, [x0, #32]
35 tail call void @llvm.memset.inline.p0.i64(ptr %a, i8 %value, i64 1024, i1 0)