[PATCH] D104472: [ValueTracking] look through bitcast of vector in computeKnownBits

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 07:39:51 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1217
+        Known.One |= KnownSrc.One.zext(BitWidth).shl(ShiftAmt);
+        Known.Zero |= KnownSrc.Zero.zext(BitWidth).shl(ShiftAmt);
+      }
----------------
spatel wrote:
> RKSimon wrote:
> > Can you use APInt::insertBits here ?
> Yes - at least that's how I drafted it originally. But I made it match the existing DAG code, so we'd get more testing for both versions once this is in (there seems to be much more fuzz/bot coverage for IR than codegen).
> 
> How about a TODO that we could update both versions simultaneously?
Updated in rG7353beda4aa1 - there's several additional cases where we could use insertBits/extractBits that I'll deal with at another time.


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

https://reviews.llvm.org/D104472



More information about the llvm-commits mailing list