[PATCH] D22779: Clone block with icmp+branch if it likely results in further jump threading
David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 20:33:26 PDT 2016
davidxl added inline comments.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:890
@@ +889,3 @@
+ if (CmpInst *Cmp = dyn_cast<CmpInst>(CondInst)) {
+ if (Cmp->getParent() != BB || !isa<BranchInst>(BB->getTerminator()))
+ return false;
----------------
Why is the Cmp->getParent() check needed?
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:902
@@ +901,3 @@
+ if (!isa<Instruction>(SuccCond) ||
+ cast<Instruction>(SuccCond)->getParent() == Succ ||
+ cast<Instruction>(SuccCond)->getParent() == BB)
----------------
is Checking the parent BB too restrictive here?
https://reviews.llvm.org/D22779
More information about the llvm-commits
mailing list