1; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s 2; Check that the packetizer generates valid packets with constant 3; extended add and base+offset store instructions. 4 5; CHECK: { 6; CHECK-NEXT: r{{[0-9]+}}{{ *}}={{ *}}add(r{{[0-9]+}}, ##{{[0-9]+}}) 7; CHECK-NEXT: memw(r{{[0-9]+}}+{{ *}}##{{[0-9]+}}){{ *}}={{ *}}r{{[0-9]+}}.new 8; CHECK-NEXT: } 9 10define i32 @test(i32* nocapture %a, i32* nocapture %b, i32 %c) nounwind { 11entry: 12 %add = add nsw i32 %c, 200002 13 %0 = load i32* %a, align 4 14 %add1 = add nsw i32 %0, 200000 15 %arrayidx2 = getelementptr inbounds i32* %a, i32 3000 16 store i32 %add1, i32* %arrayidx2, align 4 17 %1 = load i32* %b, align 4 18 %add4 = add nsw i32 %1, 200001 19 %arrayidx5 = getelementptr inbounds i32* %a, i32 1 20 store i32 %add4, i32* %arrayidx5, align 4 21 %arrayidx7 = getelementptr inbounds i32* %b, i32 1 22 %2 = load i32* %arrayidx7, align 4 23 %cmp = icmp sgt i32 %add4, %2 24 br i1 %cmp, label %if.then, label %if.else 25 26if.then: ; preds = %entry 27 %arrayidx8 = getelementptr inbounds i32* %a, i32 2 28 %3 = load i32* %arrayidx8, align 4 29 %arrayidx9 = getelementptr inbounds i32* %b, i32 2000 30 %4 = load i32* %arrayidx9, align 4 31 %sub = sub nsw i32 %3, %4 32 %arrayidx10 = getelementptr inbounds i32* %a, i32 4000 33 store i32 %sub, i32* %arrayidx10, align 4 34 br label %if.end 35 36if.else: ; preds = %entry 37 %arrayidx11 = getelementptr inbounds i32* %b, i32 3200 38 store i32 %add, i32* %arrayidx11, align 4 39 br label %if.end 40 41if.end: ; preds = %if.else, %if.then 42 ret i32 %add 43} 44