As described on this issue, instcombine seems to be passing the attributes of pow to sqrt. This in turn causes an assertion to be hit later on.
Here is how to get the assertion:
$ cat small.ll define void @PR58475(double %x) { %call = call afn double @pow(double %x, double 1.5) ret void } declare double @pow(double noundef, double noundef) $ opt -instcombine small.ll -disable-output
If we don't need the Attrs for any other transforms, it would be better to declare/init it just above the code where it is used.