This repository was archived by the owner on Mar 28, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
test/CodeGen/AArch64/GlobalISel Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ LegalizerInfo::getAction(const InstrAspect &Aspect) const {
93
93
if (DefaultAction != DefaultActions.end () && DefaultAction->second == Legal)
94
94
return std::make_pair (Legal, Ty);
95
95
96
- assert (DefaultAction->second == NarrowScalar && " unexpected default" );
96
+ if (DefaultAction == DefaultActions.end () ||
97
+ DefaultAction->second != NarrowScalar)
98
+ return std::make_pair (Unsupported, LLT ());
97
99
return findLegalAction (Aspect, NarrowScalar);
98
100
}
99
101
Original file line number Diff line number Diff line change @@ -74,3 +74,11 @@ define void @odd_type(i42* %addr) {
74
74
define void @sequence_mapping ([2 x i64 ] %in ) {
75
75
ret void
76
76
}
77
+
78
+ ; Legalizer was asserting when it enountered an unexpected default action.
79
+ ; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for legal_default
80
+ ; FALLBACK-WITH-REPORT-LABEL: legal_default:
81
+ define void @legal_default (i64 %in ) {
82
+ insertvalue [2 x i64 ] undef , i64 %in , 0
83
+ ret void
84
+ }
You can’t perform that action at this time.
0 commit comments