[PATCH] D88316: [InstCombine] recognizeBSwapOrBitReverseIdiom - recognise zext(bswap(trunc(x))) patterns (PR39793)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 11:06:34 PDT 2020
RKSimon planned changes to this revision.
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:3027-3029
+ if (isPowerOf2_32(BitProvenance.size())) {
+ // Keep halving the demanded width while the upper half is zero.
+ while (BitProvenance.size() > 2) {
----------------
lebedev.ri wrote:
> Why is this restricted to powers of two?
Good catch - my solution was too focused on the original test cases - I'm looking at refactoring this now.
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