asb wrote: The getConstantOperandAPInt equivalent to this was committed directly in a181b425659a. Far fewer opportunities (though there are some more if we add a `SDNode::getAsAPIntVal()` helper). https://github.com/llvm/llvm-project/pull/76708