This is NFC-intended for the callers. Posting in case there are other potential users that I missed.
I would also use this from VectorCombine in a patch for:
https://llvm.org/PR52178
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This is personal style! I would hoist the ugly c-style cast out of the loop and avoid the subtraction with mixed signed integers.
Comment Actions
Sure - then I can also put another safety assert on that value. The casts were carried over from the SDAG code which has lots of that messiness dealing with shuffle mask values.
Comment Actions
Updated to use signed number of elements and assert that the value is in expected range.
Comment Actions
LGTM - cheers!
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
21260 | (style) remove braces |
(style) remove braces