Skip to content

Commit 3b8ffe6

Browse files
committed
[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.
1 parent 8a8af12 commit 3b8ffe6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/IPO/Attributor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,8 @@ void IRPosition::verify() {
885885
"Expected a nullptr for an invalid position!");
886886
return;
887887
case IRP_FLOAT:
888-
assert((!isa<CallBase>(&getAssociatedValue()) &&
889-
!isa<Argument>(&getAssociatedValue())) &&
890-
"Expected specialized kind for call base and argument values!");
888+
assert((!isa<Argument>(&getAssociatedValue())) &&
889+
"Expected specialized kind for argument values!");
891890
return;
892891
case IRP_RETURNED:
893892
assert(isa<Function>(getAsValuePtr()) &&

0 commit comments

Comments
 (0)