1 ; Test that DAGCombiner gets helped by getKnownBitsForTargetNode() when 2 ; BITCAST nodes are involved on a big-endian target. 3 ; 4 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 < %s | FileCheck %s 5 6 define void @fun() { 7 entry: 8 br label %lab0 9 10 lab0: 11 %phi = phi i64 [ %sel, %lab0 ], [ 0, %entry ] 12 %add = add nuw nsw i64 %phi, 1 13 %cmp = icmp eq i64 %add, undef 14 %ins = insertelement <2 x i1> undef, i1 %cmp, i32 0 15 %xor = xor <2 x i1> %ins, <i1 true, i1 true> 16 %extr = extractelement <2 x i1> %xor, i32 0 17 ; The EXTRACT_VECTOR_ELT is done first into an i32, and then AND:ed with 18 ; 1. The AND is not actually necessary since the element contains a CC (i1) 19 ; value. Test that the BITCAST nodes in the DAG when computing KnownBits is 20 ; handled so that the AND is removed. If this succeeds, this results in a CHI 21 ; instead of TMLL. 22 23 ; CHECK-LABEL: # %bb.0: 24 ; CHECK: chi 25 ; CHECK-NOT: tmll 26 ; CHECK: j 27 %sel = select i1 %extr, i64 %add, i64 0 28 br label %lab0 29 } 30