xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/X86/adde-carry.ll (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc; RUN: llc -march=x86-64 < %s | FileCheck %s -check-prefix=CHECK-64
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambucdefine void @a(i64* nocapture %s, i64* nocapture %t, i64 %a, i64 %b, i64 %c) nounwind {
4*f4a2713aSLionel Sambucentry:
5*f4a2713aSLionel Sambuc %0 = zext i64 %a to i128
6*f4a2713aSLionel Sambuc %1 = zext i64 %b to i128
7*f4a2713aSLionel Sambuc %2 = add i128 %1, %0
8*f4a2713aSLionel Sambuc %3 = zext i64 %c to i128
9*f4a2713aSLionel Sambuc %4 = shl i128 %3, 64
10*f4a2713aSLionel Sambuc %5 = add i128 %4, %2
11*f4a2713aSLionel Sambuc %6 = lshr i128 %5, 64
12*f4a2713aSLionel Sambuc %7 = trunc i128 %6 to i64
13*f4a2713aSLionel Sambuc store i64 %7, i64* %s, align 8
14*f4a2713aSLionel Sambuc %8 = trunc i128 %2 to i64
15*f4a2713aSLionel Sambuc store i64 %8, i64* %t, align 8
16*f4a2713aSLionel Sambuc ret void
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambuc; CHECK-64: addq
19*f4a2713aSLionel Sambuc; CHECK-64: adcq $0
20*f4a2713aSLionel Sambuc}
21