[llvm] [ValueTracking] Fix "getOperand() out of range!" assertion crash (PR #87482)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 02:05:36 PDT 2024


nikic wrote:

> > Not sure this is really the right fix. If a function has a noundef attribute on the return value, then it cannot have a void return. This looks more like a context problem, in that we're dealing with two different functions during inlining.
> 
> I suspected this, but the LangRef for noundef isn't really clear on this aspect: https://llvm.org/docs/LangRef.html. It's not mentioned anywhere that noundef attribute on the return value means it can't have a void return.

Yeah, this is not spelled out in LangRef, but it's verified here: https://github.com/llvm/llvm-project/blob/4ae33c52f794dbd64924dd006570cdc409c297bc/llvm/lib/IR/Attributes.cpp#L2067-L2071

https://github.com/llvm/llvm-project/pull/87482


More information about the llvm-commits mailing list