summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PTX/sub.ll
blob: aab3fdadad139c05a64c2b74c1407fcc8b3db5cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llc < %s -march=ptx | FileCheck %s

define ptx_device i32 @t1(i32 %x, i32 %y) {
;CHECK: sub.s32 r0, r1, r2;
	%z = sub i32 %x, %y
;CHECK: ret;
	ret i32 %z
}

define ptx_device i32 @t2(i32 %x) {
;CHECK: add.s32 r0, r1, -1;
	%z = sub i32 %x, 1
;CHECK: ret;
	ret i32 %z
}
OpenPOWER on IntegriCloud