[PATCH] D86665: [GlobalISel][IRTranslator] Generate better conditional branch lowering.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 14:49:04 PDT 2020
aemerson added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:522
+IRTranslator::shouldEmitAsBranches(const std::vector<SwitchCG::CaseBlock> &Cases) {
+ if (Cases.size() != 2) return true;
+
----------------
paquette wrote:
> Why?
Because for multiple cases, it's generally better to emit as branches. The code below is trying to handle some special cases which can be simplified better than using multiple branches. I'll add tests for those.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86665/new/
https://reviews.llvm.org/D86665
More information about the llvm-commits
mailing list