[PATCH] D36395: [InstCombine] narrow rotate left/right patterns to eliminate zext/trunc (PR34046)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 16:50:04 PDT 2017
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:484
+ Type *DestTy = Trunc.getType();
+ unsigned NarrowWidth = DestTy->getScalarSizeInBits();
+ if (NarrowWidth != *BitWidthC)
----------------
craig.topper wrote:
> Since we don't support vectors here. Should this be getIntegerBitWidth()?
But we do support vectors - see the 2nd regression test.
================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:485
+ unsigned NarrowWidth = DestTy->getScalarSizeInBits();
+ if (NarrowWidth != *BitWidthC)
+ return nullptr;
----------------
craig.topper wrote:
> Could you have used m_SpecificInt in the matchers above? to avoid this separate check?
Because we do support vectors, we can't do that?
https://reviews.llvm.org/D36395
More information about the llvm-commits
mailing list