1; RUN: llc -mtriple=powerpc64le -simplify-mir -verify-machineinstrs \
2; RUN:   -stop-after=finalize-isel < %s | FileCheck %s
3
4declare void @foo(i64)
5declare void @bar(i1)
6
7define void @f(i64 %a, i64 %b) {
8  ; CHECK-LABEL: name: f
9  ; CHECK: bb.0 (%ir-block.0):
10  ; CHECK:   liveins: $x3, $x4
11  ; CHECK:   [[COPY:%[0-9]+]]:g8rc = COPY $x4
12  ; CHECK:   [[COPY1:%[0-9]+]]:g8rc = COPY $x3
13  ; CHECK:   [[SUBF8_:%[0-9]+]]:g8rc = nsw SUBF8 [[COPY1]], [[COPY]]
14  %c = sub nsw i64 %b, %a
15  call void @foo(i64 %c)
16  %d = icmp slt i64 %a, %b
17  call void @bar(i1 %d)
18  ret void
19}
20
21define void @g(i64 %a, i64 %b) {
22  ; CHECK-LABEL: name: g
23  ; CHECK: bb.0 (%ir-block.0):
24  ; CHECK:   liveins: $x3, $x4
25  ; CHECK:   [[COPY:%[0-9]+]]:g8rc = COPY $x4
26  ; CHECK:   [[COPY1:%[0-9]+]]:g8rc = COPY $x3
27  ; CHECK:   [[SUBF8_:%[0-9]+]]:g8rc = nsw SUBF8 [[COPY]], [[COPY1]]
28  %c = sub nsw i64 %a, %b
29  call void @foo(i64 %c)
30  %d = icmp slt i64 %a, %b
31  call void @bar(i1 %d)
32  ret void
33}
34