1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
3 ; Test that DAGCombiner does not produce an addcarry node if the carry
4 ; producer is not legal. This can happen e.g. with an uaddo with a type
7 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 < %s | FileCheck %s
9 define void @fun(i16 %arg0, i16* %src, i32* %dst) {
11 ; CHECK: # %bb.0: # %bb
12 ; CHECK-NEXT: llhr %r0, %r2
13 ; CHECK-NEXT: llh %r2, 0(%r3)
14 ; CHECK-NEXT: chi %r0, 9616
15 ; CHECK-NEXT: lhi %r1, 0
16 ; CHECK-NEXT: lochil %r1, 1
17 ; CHECK-NEXT: afi %r2, 65535
18 ; CHECK-NEXT: llhr %r3, %r2
19 ; CHECK-NEXT: lhi %r0, 0
20 ; CHECK-NEXT: cr %r3, %r2
21 ; CHECK-NEXT: lochilh %r0, 1
22 ; CHECK-NEXT: ar %r0, %r1
23 ; CHECK-NEXT: st %r0, 0(%r4)
26 %tmp = icmp ult i16 %arg0, 9616
27 %tmp1 = zext i1 %tmp to i32
28 %tmp2 = load i16, i16* %src
29 %tmp3 = add i16 %tmp2, -1
30 %tmp4 = icmp ne i16 %tmp2, 0
31 %tmp5 = zext i1 %tmp4 to i32
32 %tmp6 = add nuw nsw i32 %tmp5, %tmp1
33 store i32 %tmp6, i32* %dst