[PATCH] D95139: [SVE][LoopVectorize] Add support for extracting the last lane of a scalable vector
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 01:45:23 PST 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:70
+ break;
+ default:
+ assert(LaneKind == VPLane::Kind::First);
----------------
david-arm wrote:
> sdesmalen wrote:
> > don't use default. Cover both cases explicitly, so that if another enum value is added, the compiler will emit a diagnostic this case is not covered.
> OK I can do that - it just might mean adding an initialiser to Lane at the start of the function. I can't return directly from a case statement without a default as the compiler warns about functions returning void otherwise.
can you just put `llvm_unreachable` after the switch to get rid of the warning?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95139/new/
https://reviews.llvm.org/D95139
More information about the llvm-commits
mailing list