[PATCH] D95139: [SVE][LoopVectorize] Add support for extracting the last lane of a scalable vector
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 01:50:41 PST 2021
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:70
+ break;
+ default:
+ assert(LaneKind == VPLane::Kind::First);
----------------
fhahn wrote:
> 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?
Yeah I can do that if that's the preferred way?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95139/new/
https://reviews.llvm.org/D95139
More information about the llvm-commits
mailing list