Closed ETatuzova closed 8 months ago
Fail happens on processing parameters of call
:
%5 = call noundef i32 @_Z1fPiS_(ptr noundef %3, ptr poison)
'v.end()' is special llvm constant poison
which is UndefValue
and not AggregateType
, so we have no it in frame of stack.
It means now end
iterator can't be used as parameter of instruction.
But valid expressions based on end
iterator is ok: *(v.en() - 1)
possible solution - process poison
value as undefined integer constant:
if (undef_type->isIntegerTy() || undef_type->isFieldTy() || llvm::isa<llvm::PoisonValue>(c)) {
On this example:
assigner fails with
undef_type->isAggregateType()
error.