[PATCH] D28968: LoopUnswitch - Simplify based on known not to a be constant.
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 11:47:07 PST 2017
trentxintong added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:1395
+ Value *Op1 = CI->getOperand(1);
+ if ((Op0 == Cond && Op1 == Val) || (Op0 == Val && Op1 == Cond)) {
+ LLVMContext &Ctx = Inst->getContext();
----------------
efriedma wrote:
> Missing check that Val is a ConstantInt.
Val is going to be a ConstantInt, as its used by ICmpInst, I will add an assert though =).
https://reviews.llvm.org/D28968
More information about the llvm-commits
mailing list