This overlaps with D76010, but I wanted to check if I'm missing any known corner cases for poison/undef. If so, I can add tests and/or improve the LangRef to make that more obvious.
Details
Diff Detail
Event Timeline
As D76010's review is taking time, I'm fine with shipping this first.
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4619 | We should check whether the constant or an element of it is not constexpr too. |
Patch updated:
Disallow constant expressions or constant expression elements in a vector (tests added with rG6c3c7a0).
Could we unwrap the ConstExpr by opcode similar to what we are doing for Instruction as a follow-up improvement?
Oh yes, I agree it will be great.
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4619 | Just realized that struct values can be given to freeze operation as well, sorry. Fully implementing this will require recursive call of this function. |
We should check whether the constant or an element of it is not constexpr too.