1 ; Test that ComputeNumSignBitsForTargetNode() (SELECT_CCMASK) will help
2 ; DAGCombiner so that it knows that %sel0 is already sign extended.
4 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -debug-only=isel < %s 2>&1 | FileCheck %s
7 %0 = type <{ %1*, i16, [6 x i8] }>
8 %1 = type { i32 (...)** }
10 define signext i16 @fun(%0* %Arg0, i16 signext %Arg1) {
12 br i1 undef, label %lab0, label %lab1
15 %icmp0 = icmp eq i32 undef, 0
16 %sel0 = select i1 %icmp0, i16 %Arg1, i16 1
20 ; CHECK: *** MachineFunction at end of ISel ***
21 ; CHECK-LABEL: bb.2.lab1:
24 %phi0 = phi i16 [ 2, %entry ], [ %sel0, %lab0 ]
25 %sext0 = sext i16 %phi0 to i32
26 br i1 undef, label %lab2, label %lab3
29 %and0 = and i32 %sext0, 8
30 %icmp1 = icmp eq i32 %and0, 0
31 %sel1 = select i1 %icmp1, i16 %phi0, i16 4