[PATCH] D35896: [X86] CombineBT - more aggressively determine demanded bits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 18:04:42 PDT 2017


craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2007
+    // non-extended source (even though the extended bits are technically undef).
+    if (!!Mask.getHiBits(SrcBitWidth))
+      break;
----------------
This doesn't seem right to me. Doesn't that get the upper SrcBitWidth bits of Mask? But the extended bits should be (BitWidth - SrcBitWidth) right?

But in any case can't this be 'if (Mask.getActiveBits() > SrcBitWidth)' which would avoid a temporary APInt.


Repository:
  rL LLVM

https://reviews.llvm.org/D35896





More information about the llvm-commits mailing list