[PATCH] D30712: [JumpThread] Try to fold SwitchInst before attempting to jumpthread it

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 12:29:34 PST 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:810
+    // Switch(i1) will be converted to CondBr by SimplifyCFG and therefore
+    // handled by the CondBr folding here..
     BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator());
----------------
I think the original comment was suggesting that jump threading could use getConstantRange or something like that to prune impossible switch destinations.


https://reviews.llvm.org/D30712





More information about the llvm-commits mailing list