Skip to content

Commit 0ac0c73

Browse files
committed
Fix crash legalizing undef bool.
1 parent 4860b8a commit 0ac0c73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Target/Z80/GISel/Z80LegalizerInfo.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ Z80LegalizerInfo::Z80LegalizerInfo(const Z80Subtarget &STI,
3838
LLT sMax = Is24Bit ? s24 : s16;
3939
auto LegalTypes24 = {p0, s8, s16, s24}, LegalTypes16 = {p0, s8, s16};
4040
auto LegalTypes = Is24Bit ? LegalTypes24 : LegalTypes16;
41+
auto LegalTypesWithOne24 = {p0, s1, s8, s16, s24},
42+
LegalTypesWithOne16 = {p0, s1, s8, s16};
43+
auto LegalTypesWithOne = Is24Bit ? LegalTypesWithOne24 : LegalTypesWithOne16;
4144
auto LegalScalars24 = {s8, s16, s24}, LegalScalars16 = {s8, s16};
4245
auto LegalScalars = Is24Bit ? LegalScalars24 : LegalScalars16;
4346
auto LegalLibcallScalars24 = {s8, s16, s24, s32, s64};
@@ -52,7 +55,7 @@ Z80LegalizerInfo::Z80LegalizerInfo(const Z80Subtarget &STI,
5255
auto NotMaxWithOne = Is24Bit ? NotMaxWithOne24 : NotMaxWithOne16;
5356

5457
getActionDefinitionsBuilder(G_IMPLICIT_DEF)
55-
.legalFor(LegalTypes);
58+
.legalFor(LegalTypesWithOne);
5659

5760
getActionDefinitionsBuilder(G_MERGE_VALUES)
5861
.legalForCartesianProduct(NotMin, NotMax)

0 commit comments

Comments
 (0)