1; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s 2 3define i128 @test_simple(i128 %a, i128 %b, i128 %c) { 4; CHECK: test_simple: 5 6 %valadd = add i128 %a, %b 7; CHECK: adds [[ADDLO:x[0-9]+]], x0, x2 8; CHECK-NEXT: adcs [[ADDHI:x[0-9]+]], x1, x3 9 10 %valsub = sub i128 %valadd, %c 11; CHECK: subs x0, [[ADDLO]], x4 12; CHECK: sbcs x1, [[ADDHI]], x5 13 14 ret i128 %valsub 15; CHECK: ret 16} 17 18define i128 @test_imm(i128 %a) { 19; CHECK: test_imm: 20 21 %val = add i128 %a, 12 22; CHECK: adds x0, x0, #12 23; CHECK: adcs x1, x1, {{x[0-9]|xzr}} 24 25 ret i128 %val 26; CHECK: ret 27} 28 29define i128 @test_shifted(i128 %a, i128 %b) { 30; CHECK: test_shifted: 31 32 %rhs = shl i128 %b, 45 33 34 %val = add i128 %a, %rhs 35; CHECK: adds x0, x0, x2, lsl #45 36; CHECK: adcs x1, x1, {{x[0-9]}} 37 38 ret i128 %val 39; CHECK: ret 40} 41 42define i128 @test_extended(i128 %a, i16 %b) { 43; CHECK: test_extended: 44 45 %ext = sext i16 %b to i128 46 %rhs = shl i128 %ext, 3 47 48 %val = add i128 %a, %rhs 49; CHECK: adds x0, x0, w2, sxth #3 50; CHECK: adcs x1, x1, {{x[0-9]}} 51 52 ret i128 %val 53; CHECK: ret 54} 55