[PATCH] D124856: [SDAG] Handle truncated not in haveNoCommonBitsSet()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 01:55:06 PDT 2022


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4702
+      ExtArg.getOperand(0).getOpcode() == ISD::TRUNCATE)
+    return ExtArg.getOperand(0).getOperand(0);
+  return SDValue();
----------------
RKSimon wrote:
> Sorry I haven't checked this properly - but do we need to confirm the size of the pre-truncated value?
I don't think this is strictly necessary, because we'd just fail the comparison between different-sized SDValues later on. However, I still think it makes sense to include the check from an API perspective, so that getBitwiseNotOperand always returns a value of the same size as its argument.


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

https://reviews.llvm.org/D124856



More information about the llvm-commits mailing list