[PATCH] D102969: [GlobalISel] Add G_SBFX/G_UBFX to computeKnownBits

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 03:45:58 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp:514
+        WidthKnown.getMinValue().getLimitedValue(BitWidth));
+    Known = KnownBits::lshr(SrcOpKnown, OffsetKnown) & Mask;
+    if (Opcode == TargetOpcode::G_SBFX) {
----------------
foad wrote:
> RKSimon wrote:
> > Are you going to have any issues here when Mask.hasConflict() is true?
> That can only happen if WidthKnown.getMinValue() > WidthKnown.getMaxValue(), which I guess can only happen if WidthKnown.hasConflict() was already true. What are the rules about introducing or propagating conflicts?
Well, we do assert there is no conflict at the end of GISelKnownBits::computeKnownBitsImpl so we should be ensuring this doesn't happen.


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

https://reviews.llvm.org/D102969



More information about the llvm-commits mailing list