From 3b8ffe668db208016665c5af1da1ae4514f9921e Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Tue, 1 Feb 2022 02:23:55 -0600 Subject: [PATCH] [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. --- llvm/lib/Transforms/IPO/Attributor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 1b9e482fa388..d66140a726f6 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -885,9 +885,8 @@ void IRPosition::verify() { "Expected a nullptr for an invalid position!"); return; case IRP_FLOAT: - assert((!isa(&getAssociatedValue()) && - !isa(&getAssociatedValue())) && - "Expected specialized kind for call base and argument values!"); + assert((!isa(&getAssociatedValue())) && + "Expected specialized kind for argument values!"); return; case IRP_RETURNED: assert(isa(getAsValuePtr()) &&