1 ; Test that DAGCombiner gets helped by getKnownBitsForTargetNode() when
2 ; BITCAST nodes are involved on a big-endian target.
4 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 < %s | FileCheck %s
11 %phi = phi i64 [ %sel, %lab0 ], [ 0, %entry ]
12 %add = add nuw nsw i64 %phi, 1
13 %add2 = add nuw nsw i64 %phi, 2
14 %cmp = icmp eq i64 %add, undef
15 %cmp2 = icmp eq i64 %add2, undef
16 %ins = insertelement <2 x i1> undef, i1 %cmp, i32 0
17 %ins2 = insertelement <2 x i1> undef, i1 %cmp2, i32 0
18 %xor = xor <2 x i1> %ins, %ins2
19 %extr = extractelement <2 x i1> %xor, i32 0
20 ; The EXTRACT_VECTOR_ELT is done first into an i32, and then AND:ed with
21 ; 1. The AND is not actually necessary since the element contains a CC (i1)
22 ; value. Test that the BITCAST nodes in the DAG when computing KnownBits is
23 ; handled so that the AND is removed. If this succeeds, this results in a CHI
26 ; CHECK-LABEL: # %bb.0:
30 %sel = select i1 %extr, i64 %add, i64 0