[Attributor][FIX] Relax assertion in IRPosition::verify

A call base can be a floating value if we talk about the instruction and
not the return value. This distinction was not made before but is
important for liveness, e.g., a call site return value might be unused
(=dead) but the call site is not.
This commit is contained in:
Johannes Doerfert 2022-02-01 02:23:55 -06:00
parent 8a8af12028
commit 3b8ffe668d
1 changed files with 2 additions and 3 deletions

View File

@ -885,9 +885,8 @@ void IRPosition::verify() {
"Expected a nullptr for an invalid position!");
return;
case IRP_FLOAT:
assert((!isa<CallBase>(&getAssociatedValue()) &&
!isa<Argument>(&getAssociatedValue())) &&
"Expected specialized kind for call base and argument values!");
assert((!isa<Argument>(&getAssociatedValue())) &&
"Expected specialized kind for argument values!");
return;
case IRP_RETURNED:
assert(isa<Function>(getAsValuePtr()) &&