Commit 2cf7ef5
committed
[IRGen] Fix FixedArray of fixedSize 1 elt addring.
When a `FixedArray`'s fixed size is 1, it looks like `[1 x %Ty]`. Given
an array's address, performing an operation on each element's address
entail's indexing into the array to each element's index to produce an
element's address for each index. That is true even when the array
consists of a single element. In that case, produce an address for that
single element by indexing to index 0 into each passed-in array.
rdar://1517263871 parent eb8da5e commit 2cf7ef5
File tree
2 files changed
+30
-2
lines changed- lib/IRGen
- validation-test/IRGen
2 files changed
+30
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments