kyulee-com wrote:

> Do we know why `OpIdx` is 4 here? This is confusing to me because it looks 
> like there is only one argument, `%5`.

The `ignoreOp` function was initially designed for use with 
`llvm::StructuralHashWithDifferences`, where it iterates over operands within 
the same instruction. In this context, `OpIdx` is always within the valid range 
for the specified instruction.
However, we now also utilize this function to determine if a particular operand 
can be ignored in certain instructions during this merge operation, as matched 
in the stable function summary— see  `hasValidSharedConst()`  for its use. So, 
there may be cases where an out-of-range index is passed from a different 
instruction context (although the entire function hash is matched). In this 
case, we should simply return false, as the target operand is not an 
interesting operand (that can be ignored/parameterized for merging).


https://github.com/llvm/llvm-project/pull/115750
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to