[PATCH] D152541: [InstCombine][CGP] Move swapMayExposeCSEOpportunities() fold
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 03:30:13 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:1851
+ if (++NumInspected > 128)
+ return false;
+ if (match(U, m_Sub(m_Specific(Op1), m_Specific(Op0))))
----------------
RKSimon wrote:
> I feel like this limiter has a story behind it - but I'm not sure whether we need to do anything about it......
It does: At one point the InstCombine fold tried to inspect the users of a constant like i32 0, with millions of entries. When I fixed that I both added the guard against constants and a limit on the walk, to be doubly sure it doesn't get out of hand...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152541/new/
https://reviews.llvm.org/D152541
More information about the llvm-commits
mailing list