mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-21 16:24:47 +00:00
Get rid of a useless if statement whose then and else blocks were identical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2e20d39493
commit
a2913eea9d
@ -920,10 +920,7 @@ struct StrLenOptimization : public LibCallOptimization {
|
|||||||
|
|
||||||
// strlen("xyz") -> 3 (for example)
|
// strlen("xyz") -> 3 (for example)
|
||||||
const Type *Ty = SLC.getTargetData()->getIntPtrType();
|
const Type *Ty = SLC.getTargetData()->getIntPtrType();
|
||||||
if (Ty->isSigned())
|
ci->replaceAllUsesWith(ConstantInt::get(Ty, len));
|
||||||
ci->replaceAllUsesWith(ConstantInt::get(Ty, len));
|
|
||||||
else
|
|
||||||
ci->replaceAllUsesWith(ConstantInt::get(Ty, len));
|
|
||||||
|
|
||||||
ci->eraseFromParent();
|
ci->eraseFromParent();
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user