[PATCH] D88316: [InstCombine] recognizeBSwapOrBitReverseIdiom - recognise zext(bswap(trunc(x))) patterns (PR39793)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 12:53:27 PDT 2020
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:3027
+ // If the upper bits are zero, then attempt to perform as a truncated op.
+ if (BitProvenance[BitProvenance.size() - 1] < 0) {
+ unsigned NumBits = BitProvenance.size();
----------------
Should this check and the later one be for `== BitPart::Unset` rather than <0?
Can we assert that BitProvenance is not <0 other than 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