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.uadd.sat.i4 (i4, i4)
5 declare i32 @llvm.uadd.sat.i32 (i32, i32)
6 declare i64 @llvm.uadd.sat.i64 (i64, i64)
8 define i32 @func(i32 %x, i32 %y) nounwind {
11 ; CHECK-NEXT: adds w8, w0, w1
12 ; CHECK-NEXT: csinv w0, w8, wzr, lo
14 %tmp = call i32 @llvm.uadd.sat.i32(i32 %x, i32 %y);
18 define i64 @func2(i64 %x, i64 %y) nounwind {
21 ; CHECK-NEXT: adds x8, x0, x1
22 ; CHECK-NEXT: csinv x0, x8, xzr, lo
24 %tmp = call i64 @llvm.uadd.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: adds w8, w8, w1, lsl #28
33 ; CHECK-NEXT: csinv w8, w8, wzr, lo
34 ; CHECK-NEXT: lsr w0, w8, #28
36 %tmp = call i4 @llvm.uadd.sat.i4(i4 %x, i4 %y);