1 ; RUN: sed -e 's/SLHATTR/speculative_load_hardening/' %s | llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu | FileCheck %s --check-prefixes=CHECK,SLH --dump-input-on-failure
2 ; RUN: sed -e 's/SLHATTR//' %s | llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu | FileCheck %s --check-prefixes=CHECK,NOSLH --dump-input-on-failure
4 declare i64 @g(i64, i64) local_unnamed_addr
5 define i64 @f_using_reserved_reg_x16(i64 %a, i64 %b) local_unnamed_addr SLHATTR {
6 ; CHECK-LABEL: f_using_reserved_reg_x16
12 %cmp = icmp ugt i64 %a, %b
13 br i1 %cmp, label %if.then, label %cleanup
21 %0 = tail call i64 asm "autia1716", "={x17},{x16},0"(i64 %b, i64 %a)
28 %call = tail call i64 @g(i64 %a, i64 %b) #3
29 %add = add i64 %call, %0
38 %retval.0 = phi i64 [ %add, %if.then ], [ %b, %entry ]
42 define i32 @f_clobbered_reg_w16(i32 %a, i32 %b) local_unnamed_addr SLHATTR {
43 ; CHECK-LABEL: f_clobbered_reg_w16
49 %cmp = icmp sgt i32 %a, %b
50 br i1 %cmp, label %if.then, label %if.end
59 tail call void asm sideeffect "mov w16, ${0:w}", "r,~{w16}"(i32 %a)
64 %add = add nsw i32 %b, %a