[PATCH] D88783: [InstCombine] matchFunnelShift - fold or(shl(a,x),lshr(b,sub(bw,x))) -> fshl(a,b,x) iff x < bw

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 09:44:27 PDT 2020


RKSimon added a comment.

In D88783#2322063 <https://reviews.llvm.org/D88783#2322063>, @lebedev.ri wrote:

> And that highlights my point - we might know that the shift amount is safe not from an explicit mask, but e.g. from range metadata on load <https://llvm.org/docs/LangRef.html#range-metadata>, which means expansion will still introduce a masking op that wasn't there originally.

So ValueTracking/SelectionDAG::ComputeKnownBits won't be able to check range data for us?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88783/new/

https://reviews.llvm.org/D88783



More information about the llvm-commits mailing list