[cfe-commits] r91198 - in /cfe/trunk: include/clang/Basic/LangOptions.h include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenFunction.h lib/Driver/Tools.cpp l
Eli Friedman
eli.friedman at gmail.com
Fri Dec 11 18:11:36 PST 2009
On Fri, Dec 11, 2009 at 5:27 PM, Mike Stump <mrs at apple.com> wrote:
> + 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,
> + 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);
> + }
Both sides of this if statment are functionally identical.
-Eli
More information about the cfe-commits
mailing list