File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -6531,17 +6531,8 @@ SwitchLookupTable::SwitchLookupTable(
65316531 uint64_t Idx = (CaseVal->getValue () - Offset->getValue ()).getLimitedValue ();
65326532 TableContents[Idx] = CaseRes;
65336533
6534- if (SingleValue && CaseRes != SingleValue) {
6535- if (isa<PoisonValue>(SingleValue)) {
6536- // All of the switch cases until now have returned poison.
6537- // If this case returns a non-poison value, ignore the previous
6538- // poisons and use this case's result as the single constant
6539- // value.
6540- if (!isa<PoisonValue>(CaseRes))
6541- SingleValue = CaseRes;
6542- } else if (!isa<PoisonValue>(CaseRes))
6543- SingleValue = nullptr ;
6544- }
6534+ if (SingleValue && !isa<PoisonValue>(CaseRes) && CaseRes != SingleValue)
6535+ SingleValue = isa<PoisonValue>(SingleValue) ? CaseRes : nullptr ;
65456536 }
65466537
65476538 // Fill in any holes in the table with the default result.
You can’t perform that action at this time.
0 commit comments