Commit d189354
[Z80] Handle byte-aligned extracts from wide eZ80 tuple registers.
Fix GlobalISel instruction selection for byte-aligned G_EXTRACT operations
from R32_24, R48_24, and R64_24 tuple registers in eZ80 mode.
At higher optimization levels, some code paths materialize 24-bit-mode wide
tuples and then extract an 8-bit value at offset 24. The selector handled
direct subregister extracts and a spill/reload fallback for smaller source
classes, but it had no fallback for wide tuple classes, which caused
instruction selection to abort on cases like:
G_EXTRACT %src:r64_24(s64), 24
Teach selectExtract() to spill the tuple components of R32_24/R48_24/R64_24
to a temporary stack slot and reload the requested byte-aligned slice.
Add a MIR regression test covering extraction of an 8-bit value from an
R64_24 source at offset 24.
Co-Authored-By: Codex CLI <codex@openai.com>1 parent 9ccb15e commit d189354
2 files changed
Lines changed: 84 additions & 2 deletions
File tree
- llvm
- lib/Target/Z80/GISel
- test/CodeGen/Z80
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1952 | 1952 | | |
1953 | 1953 | | |
1954 | 1954 | | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
1955 | 1972 | | |
1956 | 1973 | | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
1957 | 2005 | | |
1958 | 2006 | | |
1959 | 2007 | | |
| |||
1973 | 2021 | | |
1974 | 2022 | | |
1975 | 2023 | | |
1976 | | - | |
| 2024 | + | |
| 2025 | + | |
1977 | 2026 | | |
1978 | 2027 | | |
1979 | 2028 | | |
| |||
1990 | 2039 | | |
1991 | 2040 | | |
1992 | 2041 | | |
1993 | | - | |
| 2042 | + | |
| 2043 | + | |
1994 | 2044 | | |
1995 | 2045 | | |
1996 | 2046 | | |
| |||
| 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 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments