1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
4 declare i4 @llvm.usub.sat.i4 (i4, i4)
5 declare i32 @llvm.usub.sat.i32 (i32, i32)
6 declare i64 @llvm.usub.sat.i64 (i64, i64)
8 define i32 @func(i32 %x, i32 %y) nounwind {
11 ; CHECK-NEXT: subs w8, w0, w1
12 ; CHECK-NEXT: csel w0, wzr, w8, lo
14 %tmp = call i32 @llvm.usub.sat.i32(i32 %x, i32 %y);
18 define i64 @func2(i64 %x, i64 %y) nounwind {
21 ; CHECK-NEXT: subs x8, x0, x1
22 ; CHECK-NEXT: csel x0, xzr, x8, lo
24 %tmp = call i64 @llvm.usub.sat.i64(i64 %x, i64 %y);
28 define i4 @func3(i4 %x, i4 %y) nounwind {
31 ; CHECK-NEXT: lsl w8, w0, #28
32 ; CHECK-NEXT: subs w8, w8, w1, lsl #28
33 ; CHECK-NEXT: csel w8, wzr, w8, lo
34 ; CHECK-NEXT: lsr w0, w8, #28
36 %tmp = call i4 @llvm.usub.sat.i4(i4 %x, i4 %y);