[PATCH] D103788: [InstCombine] Eliminate casts to optimize ctlz operation
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 7 01:18:36 PDT 2021
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:954
+ // trunc (ctlz_i32(zext(A), B) --> add(ctlz_i16(A, B), C)
+ if (match(Src, m_OneUse(m_Intrinsic<Intrinsic::ctlz>(m_ZExt(m_Value(A)),
+ m_Value(B))))) {
----------------
We will need to add multiuse tests as well to check that that the m_OneUse is working correctly
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103788/new/
https://reviews.llvm.org/D103788
More information about the llvm-commits
mailing list