1; RUN: llc -march=hexagon < %s | FileCheck %s 2 3; Check that we don't generate an invalid packet with too many instructions 4; due to a store that has a must-extend operand. 5 6; CHECK: CuSuiteAdd.exit.us 7; CHECK: { 8; CHECK-NOT: call abort 9; CHECK: memw(##0) 10; CHECK: memw(r{{[0-9+]}}{{ *}}<<{{ *}}#2{{ *}}+{{ *}}##4) 11; CHECK: } 12 13%struct.CuTest.1.28.31.37.40.43.52.55.67.85.111 = type { i8*, void (%struct.CuTest.1.28.31.37.40.43.52.55.67.85.111*)*, i32, i32, i8*, [23 x i32]* } 14%struct.CuSuite.2.29.32.38.41.44.53.56.68.86.112 = type { i32, [1024 x %struct.CuTest.1.28.31.37.40.43.52.55.67.85.111*], i32 } 15 16@__func__.CuSuiteAdd = external unnamed_addr constant [11 x i8], align 8 17@.str24 = external unnamed_addr constant [140 x i8], align 8 18 19declare void @_Assert() 20 21define void @CuSuiteAddSuite() nounwind { 22entry: 23 br i1 undef, label %for.body.us, label %for.end 24 25for.body.us: ; preds = %entry 26 %0 = load %struct.CuTest.1.28.31.37.40.43.52.55.67.85.111*, %struct.CuTest.1.28.31.37.40.43.52.55.67.85.111** null, align 4 27 %1 = load i32, i32* undef, align 4 28 %cmp.i.us = icmp slt i32 %1, 1024 29 br i1 %cmp.i.us, label %CuSuiteAdd.exit.us, label %cond.false6.i.us 30 31cond.false6.i.us: ; preds = %for.body.us 32 tail call void @_Assert() nounwind 33 unreachable 34 35CuSuiteAdd.exit.us: ; preds = %for.body.us 36 %arrayidx.i.us = getelementptr inbounds %struct.CuSuite.2.29.32.38.41.44.53.56.68.86.112, %struct.CuSuite.2.29.32.38.41.44.53.56.68.86.112* null, i32 0, i32 1, i32 %1 37 store %struct.CuTest.1.28.31.37.40.43.52.55.67.85.111* %0, %struct.CuTest.1.28.31.37.40.43.52.55.67.85.111** %arrayidx.i.us, align 4 38 call void @llvm.trap() 39 unreachable 40 41for.end: ; preds = %entry 42 ret void 43} 44 45declare void @llvm.trap() noreturn nounwind 46