[PATCH] D88316: [InstCombine] recognizeBSwapOrBitReverseIdiom - recognise zext(bswap(trunc(x))) patterns (PR39793)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 04:15:26 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:3030
+ // If the upper bits are zero, then attempt to perform as a truncated op.
+ if (BitProvenance[BitProvenance.size() - 1] == BitPart::Unset) {
+ while (!BitProvenance.empty() && BitProvenance.back() == BitPart::Unset)
----------------
Super minor: this then should be `if (BitProvenance.back() == BitPart::Unset) {`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88316/new/
https://reviews.llvm.org/D88316
More information about the llvm-commits
mailing list