While vectors use insertelement, structs and arrays should use insertvalue.
We can't use an IR input once the relevant constant expressions are no longer supported. Use a bitcode file instead, which will be auto-upgraded (the whole point of this code...)