1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Remove unneeded conditionals - the code is already conditional on the same condition

llvm-svn: 305226
This commit is contained in:
David Blaikie 2017-06-12 20:09:53 +00:00
parent 0980178d03
commit 87969b4f1e

View File

@ -405,17 +405,15 @@ struct ConstModifier: public Modifier {
if (Ty->isIntegerTy()) {
switch (Ran->Rand() % 7) {
case 0: if (Ty->isIntegerTy())
return PT->push_back(ConstantInt::get(Ty,
APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
llvm_unreachable("Unexpected state");
case 1: if (Ty->isIntegerTy())
return PT->push_back(ConstantInt::get(Ty,
APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
llvm_unreachable("Unexpected state");
case 0:
return PT->push_back(ConstantInt::get(
Ty, APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
case 1:
return PT->push_back(ConstantInt::get(
Ty, APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
case 2: case 3: case 4: case 5:
case 6: if (Ty->isIntegerTy())
PT->push_back(ConstantInt::get(Ty, Ran->Rand()));
case 6:
PT->push_back(ConstantInt::get(Ty, Ran->Rand()));
}
}