Skip to content

Commit

Permalink
Revert "[SIL] Add tests for 'undef' values & code fixes"
Browse files Browse the repository at this point in the history
This test is failing on the bots and crashing for me locally.

This reverts commit 04b89d5.
  • Loading branch information
benlangmuir committed Mar 10, 2016
1 parent 3d9dc0c commit 0ead929
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 374 deletions.
17 changes: 7 additions & 10 deletions lib/SIL/SILVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2546,18 +2546,15 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
SILValue casevalue;
SILValue result;
std::tie(casevalue, result) = I->getCase(i);

if (!isa<SILUndef>(casevalue)) {
auto *il = dyn_cast<IntegerLiteralInst>(casevalue);
require(il,
"select_value case operands should refer to integer literals");
APInt elt = il->getValue();
auto *il = dyn_cast<IntegerLiteralInst>(casevalue);
require(il,
"select_value case operands should refer to integer literals");
APInt elt = il->getValue();

require(!seenCaseValues.count(elt),
"select_value dispatches on same case value more than once");
require(!seenCaseValues.count(elt),
"select_value dispatches on same case value more than once");

seenCaseValues.insert(elt);
}
seenCaseValues.insert(elt);

requireSameType(I->getOperand()->getType(), casevalue->getType(),
"select_value case value must match type of operand");
Expand Down
Loading

0 comments on commit 0ead929

Please sign in to comment.