Evan Cheng | 48d8afa | 2009-11-01 21:12:51 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim | FileCheck %s |
| 2 | ; rdar://7352504 |
| 3 | ; Make sure we use "str r9, [sp, #+28]" instead of "sub.w r4, r7, #256" followed by "str r9, [r4, #-32]". |
| 4 | |
| 5 | %0 = type { i16, i8, i8 } |
| 6 | %1 = type { [2 x i32], [2 x i32] } |
| 7 | %2 = type { %union.rec* } |
| 8 | %struct.FILE_POS = type { i8, i8, i16, i32 } |
| 9 | %struct.GAP = type { i8, i8, i16 } |
| 10 | %struct.LIST = type { %union.rec*, %union.rec* } |
| 11 | %struct.STYLE = type { %union.anon, %union.anon, i16, i16, i32 } |
| 12 | %struct.head_type = type { [2 x %struct.LIST], %union.FIRST_UNION, %union.SECOND_UNION, %union.THIRD_UNION, %union.FOURTH_UNION, %union.rec*, %2, %union.rec*, %union.rec*, %union.rec*, %union.rec*, %union.rec*, %union.rec*, %union.rec*, %union.rec*, i32 } |
| 13 | %union.FIRST_UNION = type { %struct.FILE_POS } |
| 14 | %union.FOURTH_UNION = type { %struct.STYLE } |
| 15 | %union.SECOND_UNION = type { %0 } |
| 16 | %union.THIRD_UNION = type { %1 } |
| 17 | %union.anon = type { %struct.GAP } |
| 18 | %union.rec = type { %struct.head_type } |
| 19 | |
| 20 | @zz_hold = external global %union.rec* ; <%union.rec**> [#uses=2] |
| 21 | @zz_res = external global %union.rec* ; <%union.rec**> [#uses=1] |
| 22 | |
Rafael Espindola | 1e81966 | 2010-06-17 15:18:27 +0000 | [diff] [blame^] | 23 | define %union.rec* @Manifest(%union.rec* %x, %union.rec* %env, %struct.STYLE* %style, %union.rec** %bthr, %union.rec** %fthr, %union.rec** %target, %union.rec** %crs, i32 %ok, i32 %need_expand, %union.rec** %enclose, i32 %fcr) nounwind { |
Evan Cheng | 48d8afa | 2009-11-01 21:12:51 +0000 | [diff] [blame] | 24 | entry: |
Johnny Chen | 9e08876 | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 25 | ; CHECK: ldr.w r9, [r7, #28] |
Evan Cheng | 48d8afa | 2009-11-01 21:12:51 +0000 | [diff] [blame] | 26 | %xgaps.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0] |
| 27 | %ycomp.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0] |
| 28 | br i1 false, label %bb, label %bb20 |
| 29 | |
| 30 | bb: ; preds = %entry |
| 31 | unreachable |
| 32 | |
| 33 | bb20: ; preds = %entry |
| 34 | switch i32 undef, label %bb1287 [ |
| 35 | i32 11, label %bb119 |
| 36 | i32 12, label %bb119 |
| 37 | i32 21, label %bb420 |
| 38 | i32 23, label %bb420 |
| 39 | i32 45, label %bb438 |
| 40 | i32 46, label %bb438 |
| 41 | i32 55, label %bb533 |
| 42 | i32 56, label %bb569 |
| 43 | i32 64, label %bb745 |
| 44 | i32 78, label %bb1098 |
| 45 | ] |
| 46 | |
| 47 | bb119: ; preds = %bb20, %bb20 |
| 48 | unreachable |
| 49 | |
| 50 | bb420: ; preds = %bb20, %bb20 |
Evan Cheng | 5b397c9 | 2009-11-19 06:32:27 +0000 | [diff] [blame] | 51 | ; CHECK: bb420 |
| 52 | ; CHECK: str r{{[0-7]}}, [sp] |
Johnny Chen | 9e08876 | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 53 | ; CHECK: str r{{[0-7]}}, [sp, #4] |
| 54 | ; CHECK: str r{{[0-7]}}, [sp, #8] |
| 55 | ; CHECK: str{{(.w)?}} r{{[0-9]+}}, [sp, #24] |
Evan Cheng | 48d8afa | 2009-11-01 21:12:51 +0000 | [diff] [blame] | 56 | store %union.rec* null, %union.rec** @zz_hold, align 4 |
| 57 | store %union.rec* null, %union.rec** @zz_res, align 4 |
| 58 | store %union.rec* %x, %union.rec** @zz_hold, align 4 |
Rafael Espindola | 1e81966 | 2010-06-17 15:18:27 +0000 | [diff] [blame^] | 59 | %0 = call %union.rec* @Manifest(%union.rec* undef, %union.rec* %env, %struct.STYLE* %style, %union.rec** %bthr, %union.rec** %fthr, %union.rec** %target, %union.rec** %crs, i32 %ok, i32 %need_expand, %union.rec** %enclose, i32 %fcr) nounwind ; <%union.rec*> [#uses=0] |
Evan Cheng | 48d8afa | 2009-11-01 21:12:51 +0000 | [diff] [blame] | 60 | unreachable |
| 61 | |
| 62 | bb438: ; preds = %bb20, %bb20 |
| 63 | unreachable |
| 64 | |
| 65 | bb533: ; preds = %bb20 |
| 66 | ret %union.rec* %x |
| 67 | |
| 68 | bb569: ; preds = %bb20 |
| 69 | unreachable |
| 70 | |
| 71 | bb745: ; preds = %bb20 |
| 72 | unreachable |
| 73 | |
| 74 | bb1098: ; preds = %bb20 |
| 75 | unreachable |
| 76 | |
| 77 | bb1287: ; preds = %bb20 |
| 78 | unreachable |
| 79 | } |