Colin LeMahieu | c043446 | 2015-02-04 17:52:06 +0000 | [diff] [blame] | 1 | ; XFAIL: |
Jyotsna Verma | af2359b | 2013-04-23 21:17:40 +0000 | [diff] [blame] | 2 | ; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s |
| 3 | |
| 4 | ; Check that we don't generate an invalid packet with too many instructions |
| 5 | ; due to a store that has a must-extend operand. |
| 6 | |
| 7 | ; CHECK: CuSuiteAdd.exit.us |
| 8 | ; CHECK: { |
| 9 | ; CHECK-NOT: call abort |
| 10 | ; CHECK: memw(##0) |
Colin LeMahieu | c043446 | 2015-02-04 17:52:06 +0000 | [diff] [blame] | 11 | ; CHECK: memw(r{{[0-9+]}}<<#2 + ##4) |
Jyotsna Verma | af2359b | 2013-04-23 21:17:40 +0000 | [diff] [blame] | 12 | ; CHECK: } |
| 13 | |
| 14 | %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]* } |
| 15 | %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 } |
| 16 | |
| 17 | @__func__.CuSuiteAdd = external unnamed_addr constant [11 x i8], align 8 |
| 18 | @.str24 = external unnamed_addr constant [140 x i8], align 8 |
| 19 | |
| 20 | declare void @_Assert() |
| 21 | |
| 22 | define void @CuSuiteAddSuite() nounwind { |
| 23 | entry: |
| 24 | br i1 undef, label %for.body.us, label %for.end |
| 25 | |
| 26 | for.body.us: ; preds = %entry |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame^] | 27 | %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 |
| 28 | %1 = load i32, i32* undef, align 4 |
Jyotsna Verma | af2359b | 2013-04-23 21:17:40 +0000 | [diff] [blame] | 29 | %cmp.i.us = icmp slt i32 %1, 1024 |
| 30 | br i1 %cmp.i.us, label %CuSuiteAdd.exit.us, label %cond.false6.i.us |
| 31 | |
| 32 | cond.false6.i.us: ; preds = %for.body.us |
| 33 | tail call void @_Assert() nounwind |
| 34 | unreachable |
| 35 | |
| 36 | CuSuiteAdd.exit.us: ; preds = %for.body.us |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 37 | %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 |
Jyotsna Verma | af2359b | 2013-04-23 21:17:40 +0000 | [diff] [blame] | 38 | 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 |
| 39 | call void @llvm.trap() |
| 40 | unreachable |
| 41 | |
| 42 | for.end: ; preds = %entry |
| 43 | ret void |
| 44 | } |
| 45 | |
| 46 | declare void @llvm.trap() noreturn nounwind |