[PATCH] D88578: [InstCombine] recognizeBSwapOrBitReverseIdiom - support for 'partial' bswap patterns (PR47191)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 10:41:18 PDT 2020
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:2953-2954
+ for (unsigned BitIdx = 0; BitIdx < 8; ++BitIdx)
+ Result->Provenance[(BitWidth - 8 - ByteIdx) + BitIdx] =
+ Res->Provenance[ByteIdx + BitIdx];
+ return Result;
----------------
I misread that the first time because I wasn't expecting the `+=8` for something named `ByteIndex`. Coder pref, but might be better to multiply by 8 in the index calc and use normal increment in the for-loop.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88578/new/
https://reviews.llvm.org/D88578
More information about the llvm-commits
mailing list