[PATCH] D48828: [InstSimplify] fold extracting from std::pair

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 06:25:11 PDT 2018


inouehrs added inline comments.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:1823
+      match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShAmt)), m_Value(Y)))) {
+    APInt Mask = cast<ConstantInt>(Op1)->getValue();
+    unsigned ShiftCnt = ShAmt->getZExtValue();
----------------
lebedev.ri wrote:
> lebedev.ri wrote:
> > I think you can use `const APInt& Mask` here.
> I was indeed specifically talking about `const APInt&`, not `const APInt`, note the `&`.
Fixed. Thank you for the repeated comments.


https://reviews.llvm.org/D48828





More information about the llvm-commits mailing list