[PATCH] D95426: [GlobalISel] Extract a narrowScalarAddSub method. NFC
Cassie Jones via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 11:15:58 PST 2021
porglezomp added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4460
+ unsigned OpO, OpE;
+ switch (MI.getOpcode()) {
+ case TargetOpcode::G_ADD:
----------------
paquette wrote:
> Since there are only two cases, an `if`/`else` is sufficient here.
I'm planning to expand this to support the overflowing ops later, so it will be 10 cases eventually. Should I just change it to a switch when I start adding those other cases?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95426/new/
https://reviews.llvm.org/D95426
More information about the llvm-commits
mailing list