def set_range_metadata(builder, load, lower_bound, upper_bound):
    range_operands = [Constant.int(load.type, lower_bound),
                      Constant.int(load.type, upper_bound)]
    md = builder.module.add_metadata(range_operands)
    load.set_metadata("range", md)
Set the "range" metadata on a load instruction.
dataset/ETHPy150Open numba/numba/numba/targets/arrayobj.py/set_range_metadata