Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Instead of eventually potentially duplicating the entirety of ConstantExpr methods,
i wonder if we can get away with an inverse of Constant::replaceUndefsWith(),
that takes two constants, and does an element-wise or'ing of undefs,
i.e. the LHS constant gets all the additional undefs that the RHS constant has.
Perfect, LGTM.
llvm/include/llvm/IR/Constant.h | ||
---|---|---|
208 ↗ | (On Diff #297832) | I'm having trouble parsing the first line. |
llvm/lib/IR/Constants.cpp | ||
784 | Nit: drop braces | |
804–807 | You probably want if (!match(NewC[I], m_Undef()) && match(OtherEltC, m_Undef())) { NewC[I] = OtherEltC; FoundExtraUndef = true; } otherwise you set FoundExtraUndef even if LHS already was undef. |
clang-format: please reformat the code