[PATCH] D36988: [InstCombine] fix and enhance udiv/urem narrowing
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 16:09:40 PDT 2017
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:1103
+ Constant *C;
+ if ((match(N, m_OneUse(m_ZExt(m_Value(X)))) && match(D, m_Constant(C))) ||
+ (match(D, m_OneUse(m_ZExt(m_Value(X)))) && match(N, m_Constant(C)))) {
----------------
majnemer wrote:
> craig.topper wrote:
> > This is allowing arbitrary constant expressions through. Is that we want?
> I don't see an issue with allowing ConstantExpr thru.
The intent was of course to let arbitrary vector constants through, but it should work for constexpr too. I'll add a test to make sure.
https://reviews.llvm.org/D36988
More information about the llvm-commits
mailing list