70 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s2 3; Check we can compile this test without infinite loop in the4; DAG.computeKnownBits() due to missing (Depth + 1) argument in5; call to it from computeKnownBitsForTargetNode().6 7; Check that we actually have that target 24 bit multiplication8; node produced.9 10; GCN: v_mul_u32_u2411define amdgpu_kernel void @test(ptr addrspace(1) nocapture %arg) {12bb:13 %tmp = tail call i32 @llvm.amdgcn.workitem.id.x()14 br label %bb415 16bb1: ; preds = %bb417 %tmp3 = getelementptr inbounds i32, ptr addrspace(1) %arg, i32 %tmp4618 store i32 %tmp46, ptr addrspace(1) %tmp3, align 419 ret void20 21bb4: ; preds = %bb4, %bb22 %tmp5 = phi i32 [ 0, %bb ], [ %tmp87, %bb4 ]23 %tmp6 = phi i32 [ %tmp, %bb ], [ %tmp46, %bb4 ]24 %tmp7 = ashr i32 %tmp6, 1625 %tmp8 = mul nsw i32 %tmp7, %tmp726 %tmp9 = lshr i32 %tmp8, 1627 %tmp10 = mul nuw nsw i32 %tmp9, %tmp928 %tmp11 = lshr i32 %tmp10, 1629 %tmp12 = mul nuw nsw i32 %tmp11, %tmp1130 %tmp13 = lshr i32 %tmp12, 1631 %tmp14 = mul nuw nsw i32 %tmp13, %tmp1332 %tmp15 = lshr i32 %tmp14, 1633 %tmp16 = mul nuw nsw i32 %tmp15, %tmp1534 %tmp17 = lshr i32 %tmp16, 1635 %tmp18 = mul nuw nsw i32 %tmp17, %tmp1736 %tmp19 = lshr i32 %tmp18, 1637 %tmp20 = mul nuw nsw i32 %tmp19, %tmp1938 %tmp21 = lshr i32 %tmp20, 1639 %tmp22 = mul nuw nsw i32 %tmp21, %tmp2140 %tmp23 = lshr i32 %tmp22, 1641 %tmp24 = mul nuw nsw i32 %tmp23, %tmp2342 %tmp25 = lshr i32 %tmp24, 1643 %tmp26 = mul nuw nsw i32 %tmp25, %tmp2544 %tmp27 = lshr i32 %tmp26, 1645 %tmp28 = mul nuw nsw i32 %tmp27, %tmp2746 %tmp29 = lshr i32 %tmp28, 1647 %tmp30 = mul nuw nsw i32 %tmp29, %tmp2948 %tmp31 = lshr i32 %tmp30, 1649 %tmp32 = mul nuw nsw i32 %tmp31, %tmp3150 %tmp33 = lshr i32 %tmp32, 1651 %tmp34 = mul nuw nsw i32 %tmp33, %tmp3352 %tmp35 = lshr i32 %tmp34, 1653 %tmp36 = mul nuw nsw i32 %tmp35, %tmp3554 %tmp37 = lshr i32 %tmp36, 1655 %tmp38 = mul nuw nsw i32 %tmp37, %tmp3756 %tmp39 = lshr i32 %tmp38, 1657 %tmp40 = mul nuw nsw i32 %tmp39, %tmp3958 %tmp41 = lshr i32 %tmp40, 1659 %tmp42 = mul nuw nsw i32 %tmp41, %tmp4160 %tmp43 = lshr i32 %tmp42, 1661 %tmp44 = mul nuw nsw i32 %tmp43, %tmp4362 %tmp45 = lshr i32 %tmp44, 1663 %tmp46 = mul nuw nsw i32 %tmp45, %tmp4564 %tmp87 = add nuw nsw i32 %tmp5, 165 %tmp88 = icmp eq i32 %tmp87, 100066 br i1 %tmp88, label %bb1, label %bb467}68 69declare i32 @llvm.amdgcn.workitem.id.x()70