[cfe-commits] r91324 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Mike Stump
mrs at apple.com
Mon Dec 14 12:52:00 PST 2009
Author: mrs
Date: Mon Dec 14 14:52:00 2009
New Revision: 91324
URL: http://llvm.org/viewvc/llvm-project?rev=91324&view=rev
Log:
Simplifiy.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=91324&r1=91323&r2=91324&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Mon Dec 14 14:52:00 2009
@@ -1078,23 +1078,10 @@
= getContext().getAsConstantArrayType(DRE->getType())) {
llvm::APInt Size = CAT->getSize();
llvm::BasicBlock *Cont = createBasicBlock("cont");
- if (IdxSigned) {
- Builder.CreateCondBr(Builder.CreateICmpSGE(Idx,
- llvm::ConstantInt::get(Idx->getType(), 0)),
- Cont, getAbortBB());
- EmitBlock(Cont);
- Cont = createBasicBlock("cont");
- Builder.CreateCondBr(Builder.CreateICmpSLT(Idx,
+ Builder.CreateCondBr(Builder.CreateICmpULT(Idx,
llvm::ConstantInt::get(Idx->getType(), Size)),
- Cont, getAbortBB());
- EmitBlock(Cont);
- } else {
- llvm::BasicBlock *Cont = createBasicBlock("cont");
- Builder.CreateCondBr(Builder.CreateICmpULT(Idx,
- llvm::ConstantInt::get(Idx->getType(), Size)),
- Cont, getAbortBB());
- EmitBlock(Cont);
- }
+ Cont, getAbortBB());
+ EmitBlock(Cont);
}
}
}
More information about the cfe-commits
mailing list