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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 06:12:13 PDT 2018


lebedev.ri 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:
> I think you can use `const APInt& Mask` here.
I was indeed specifically talking about `const APInt&`, not `const APInt`, note the `&`.


https://reviews.llvm.org/D48828





More information about the llvm-commits mailing list