Fold consts during IR generation