1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefixes=COMMON,NOCARRY
2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -mattr=+ptx43 | FileCheck %s --check-prefixes=COMMON,CARRY
3 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
5 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
7 ; COMMON-LABEL: test_add
8 define i128 @test_add(i128 %a, i128 %b) {
10 ; NOCARRY-NEXT: add.s64
11 ; NOCARRY-NEXT: setp.lt.u64
12 ; NOCARRY-NEXT: selp.u64
13 ; NOCARRY-NEXT: add.s64
16 ; CARRY-NEXT: addc.cc.s64
22 ; COMMON-LABEL: test_sub
23 define i128 @test_sub(i128 %a, i128 %b) {
25 ; NOCARRY-NEXT: setp.lt.u64
26 ; NOCARRY-NEXT: selp.s64
27 ; NOCARRY-NEXT: add.s64
28 ; NOCARRY-NEXT: sub.s64
31 ; CARRY-NEXT: subc.cc.s64