llvm.org GIT mirror llvm / fd2310e
Remove unneeded conditionals - the code is already conditional on the same condition git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305226 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 2 years ago
1 changed file(s) with 8 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
404404
405405 if (Ty->isIntegerTy()) {
406406 switch (Ran->Rand() % 7) {
407 case 0: if (Ty->isIntegerTy())
408 return PT->push_back(ConstantInt::get(Ty,
409 APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
410 llvm_unreachable("Unexpected state");
411 case 1: if (Ty->isIntegerTy())
412 return PT->push_back(ConstantInt::get(Ty,
413 APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
414 llvm_unreachable("Unexpected state");
407 case 0:
408 return PT->push_back(ConstantInt::get(
409 Ty, APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
410 case 1:
411 return PT->push_back(ConstantInt::get(
412 Ty, APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
415413 case 2: case 3: case 4: case 5:
416 case 6: if (Ty->isIntegerTy())
417 PT->push_back(ConstantInt::get(Ty, Ran->Rand()));
414 case 6:
415 PT->push_back(ConstantInt::get(Ty, Ran->Rand()));
418416 }
419417 }
420418