68 lines · plain
1; RUN: llc -mtriple=hexagon -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s2; REQUIRES: asserts3 4; When tail-duplicating a block with PHI nodes that use subregisters, the5; subregisters were dropped by the tail duplicator, resulting in invalid6; COPY instructions being generated.7 8; CHECK: = asl(r{{[0-9]+}}:{{[0-9]+}},#15)9 10target triple = "hexagon"11 12%struct.0 = type { i64, i16 }13%struct.1 = type { i64, i64 }14 15declare hidden fastcc void @foo(ptr noalias nocapture, i8 signext, i8 zeroext, i32, i64, i64) unnamed_addr #016 17define void @fred(ptr noalias nocapture sret(%struct.0) %agg.result, ptr byval(%struct.1) nocapture readonly align 8 %a, i32 %a0) #1 {18entry:19 %0 = load i64, ptr undef, align 820 switch i32 %a0, label %if.else [21 i32 32767, label %if.then22 i32 0, label %if.then723 ]24 25if.then: ; preds = %entry26 ret void27 28if.then7: ; preds = %entry29 br i1 undef, label %if.then.i, label %if.else16.i30 31if.then.i: ; preds = %if.then732 br i1 undef, label %if.then5.i, label %if.else.i33 34if.then5.i: ; preds = %if.then.i35 %shl.i21 = shl i64 %0, 036 br label %if.end.i37 38if.else.i: ; preds = %if.then.i39 %shl12.i = shl i64 %0, 740 br label %if.end.i41 42if.end.i: ; preds = %if.else.i, %if.then5.i43 %aSig0.0 = phi i64 [ undef, %if.then5.i ], [ %shl12.i, %if.else.i ]44 %storemerge43.i = phi i64 [ %shl.i21, %if.then5.i ], [ 0, %if.else.i ]45 %sub15.i = sub nsw i32 -63, 846 br label %if.end1347 48if.else16.i: ; preds = %if.then749 br label %if.end1350 51if.else: ; preds = %entry52 %or12 = or i64 9, 28147497671065653 br label %if.end1354 55if.end13: ; preds = %if.else, %if.else16.i, %if.end.i56 %aSig1.1 = phi i64 [ %0, %if.else ], [ %storemerge43.i, %if.end.i ], [ undef, %if.else16.i ]57 %aSig0.2 = phi i64 [ %or12, %if.else ], [ %aSig0.0, %if.end.i ], [ undef, %if.else16.i ]58 %aExp.0 = phi i32 [ undef, %if.else ], [ %sub15.i, %if.end.i ], [ undef, %if.else16.i ]59 %shl2.i = shl i64 %aSig0.2, 1560 %shr.i = lshr i64 %aSig1.1, 4961 %or.i = or i64 %shl2.i, %shr.i62 tail call fastcc void @foo(ptr noalias %agg.result, i8 signext 80, i8 zeroext undef, i32 %aExp.0, i64 %or.i, i64 undef)63 unreachable64}65 66attributes #0 = { norecurse nounwind }67attributes #1 = { nounwind }68