diff --git a/README.rst b/README.rst
index 9be382775..e56331f9b 100644
--- a/README.rst
+++ b/README.rst
@@ -41,7 +41,7 @@ Dependencies
 ============
 
 * Python versions: 3.6-3.8
-* llvmlite 0.32.*
+* llvmlite 0.31.*
 * NumPy >=1.15 (can build with 1.11 for ABI compatibility)
 
 Optionally:
diff --git a/buildscripts/condarecipe.local/meta.yaml b/buildscripts/condarecipe.local/meta.yaml
index cad87a5c8..40a411e63 100644
--- a/buildscripts/condarecipe.local/meta.yaml
+++ b/buildscripts/condarecipe.local/meta.yaml
@@ -32,7 +32,7 @@ requirements:
     - numpy
     - setuptools
     # On channel https://anaconda.org/numba/
-    - llvmlite >=0.31,<0.33
+    - llvmlite 0.31.*
     # TBB devel version is to match TBB libs
     - tbb-devel >=2019.5       # [not (armv6l or armv7l or aarch64 or linux32)]
   run:
@@ -40,7 +40,7 @@ requirements:
     - numpy >=1.15
     - setuptools
     # On channel https://anaconda.org/numba/
-    - llvmlite >=0.31,<0.33
+    - llvmlite 0.31.*
   run_constrained:
     # If TBB is present it must be at least this version from Anaconda due to
     # build flag issues triggering UB
diff --git a/numba/core/untyped_passes.py b/numba/core/untyped_passes.py
index 91d6d2670..4bf331161 100644
--- a/numba/core/untyped_passes.py
+++ b/numba/core/untyped_passes.py
@@ -1054,7 +1054,10 @@ class MixedContainerUnroller(FunctionPass):
                                                     stmt.value.value)
                                         if dfn is None:
                                             continue
-                                        args = getattr(dfn, 'args', False)
+                                        try:
+                                            args = getattr(dfn, 'args', False)
+                                        except KeyError:
+                                            continue
                                         if not args:
                                             continue
                                         if not args[0] == arg:
@@ -1127,7 +1130,10 @@ class MixedContainerUnroller(FunctionPass):
                         # try a couple of spellings... a[i] and ref(a)[i]
                         if stmt.value.value != getitem_target:
                             dfn = func_ir.get_definition(stmt.value.value)
-                            args = getattr(dfn, 'args', False)
+                            try:
+                                args = getattr(dfn, 'args', False)
+                            except KeyError:
+                                continue
                             if not args:
                                 continue
                             if not args[0] == getitem_target:
diff --git a/requirements.txt b/requirements.txt
index 6ae43a429..00c7dcbd0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
 setuptools
 numpy>=1.10
-llvmlite>=0.31,<0.33
+llvmlite==0.31.*
 argparse
diff --git a/setup.py b/setup.py
index d9af18611..72ddf36e3 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ min_python_version = "3.6"
 min_numpy_build_version = "1.11"
 min_numpy_run_version = "1.15"
 min_llvmlite_version = "0.31.0.dev0"
-max_llvmlite_version = "0.33.0.dev0"
+max_llvmlite_version = "0.32.0.dev0"
 
 if sys.platform.startswith('linux'):
     # Patch for #2555 to make wheels without libpython

literal_unroll fails when mixing iteration over untyped list
- [x] I am using the latest released version of Numba (most recent is visible in
 the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
- [x] I have included below a minimal working reproducer (if you are unsure how
 to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

Hi,

I've encountered the following problem trying to apply literal_unroll with mixed accessing to other homogeneous list, which fails at "step: performs mixed container unroll" with KeyError. Strangely it only fails when building a list inside nopython function (either from literal values or iterating over some sequence), but passes if typed.List is used or if mixed container is a reflected_list passed as an argument to the function. Here's the reproducer:

```
import numba
from numba import types
from numba.typed import List
from numba import literal_unroll

import unittest

class TestSuite(unittest.TestCase):

    # literal_unroll with mixed iteration doesn't work if mixed container
    # is an untyped list built inside jitted function
    def test_numba_literal_unroll_1(self):
        def test_impl(cont, n):
            i = 0
            # failing case #1:
            normal_list = [0, 1, 2, 3]

            # failing case #2:
            # normal_list = [j for j in range(n)]

            # failing case #2:
            # normal_list = [a for a in cont]

            # working case:
            typed_list = List.empty_list(types.int64)
            typed_list.extend(normal_list)

            mixed_cont = normal_list            # this fails to compile
#             mixed_cont = typed_list           # this can be a workaround
            heter_tuple = ('a', 25, 0.23, None)
            for item in literal_unroll(heter_tuple):
                print(item, ":", mixed_cont[i])
                i += 1

            return i
        hpat_func = numba.njit(test_impl)

        n = 4
        data = [j for j in range(n)]
        hpat_func(data, n)


if __name__ == "__main__":
    unittest.main()

```

Gives:
```
ERROR: test_numba_literal_unroll_1 (__main__.TestSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\example_test.py", line 40, in test_numba_literal_unroll_1
    hpat_func(data, n)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\dispatcher.py", line 420, in _compile_for_args
    raise e
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\dispatcher.py", line 353, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\dispatcher.py", line 794, in compile
    cres = self._compiler.compile(args, return_type)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\dispatcher.py", line 77, in compile
    status, retval = self._compile_cached(args, return_type)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\dispatcher.py", line 91, in _compile_cached
    retval = self._compile_core(args, return_type)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\dispatcher.py", line 104, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler.py", line 568, in compile_extra
    return pipeline.compile_extra(func)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler.py", line 339, in compile_extra
    return self._compile_bytecode()
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler.py", line 401, in _compile_bytecode
    return self._compile_core()
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler.py", line 381, in _compile_core
    raise e
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler.py", line 372, in _compile_core
    pm.run(self.state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 341, in run
    raise patched_exception
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 332, in run
    self._runPass(idx, pass_inst, state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 291, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 264, in check
    mangled = func(compiler_state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\untyped_passes.py", line 1447, in run_pass
    pm.run(state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 341, in run
    raise patched_exception
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 332, in run
    self._runPass(idx, pass_inst, state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 291, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\compiler_machinery.py", line 264, in check
    mangled = func(compiler_state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\untyped_passes.py", line 1224, in run_pass
    stat = self.apply_transform(state)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\untyped_passes.py", line 1092, in apply_transform
    self.unroll_loop(state, info)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\untyped_passes.py", line 1130, in unroll_loop
    args = getattr(dfn, 'args', False)
  File "C:\Users\akozlov\AppData\Local\Continuum\anaconda3\numba_master\numba\nu
mba\core\ir.py", line 382, in __getattr__
    return self._kws[name]
KeyError: 'Failed in nopython mode pipeline (step: handles literal_unroll)\n"Fai
led in literal_unroll_subpipeline mode pipeline (step: performs mixed container
unroll)\\n\'args\'"'

----------------------------------------------------------------------
Ran 1 test in 0.418s

FAILED (errors=1)
```

**Numba version:**  0.49.0.dev0+1044.gcd242db80

Can you please check it? 

Best Regards,
Alexey.
diff --git a/numba/tests/test_mixed_tuple_unroller.py b/numba/tests/test_mixed_tuple_unroller.py
index 7c8bb02c9..d29a167e3 100644
--- a/numba/tests/test_mixed_tuple_unroller.py
+++ b/numba/tests/test_mixed_tuple_unroller.py
@@ -2,7 +2,7 @@ from collections import namedtuple
 import numpy as np
 
 from numba.tests.support import (TestCase, MemoryLeakMixin,
-                                 skip_parfors_unsupported)
+                                 skip_parfors_unsupported, captured_stdout)
 from numba import njit, typed, literal_unroll, prange
 from numba.core import types, errors, ir
 from numba.testing import unittest
@@ -1653,7 +1653,7 @@ class TestMore(TestCase):
         self.assertRegexpMatches(str(raises.exception), re)
 
     def test_unroll_tuple_of_dict(self):
-        from numba.tests.support import captured_stdout
+
         @njit
         def foo():
             x = {}
@@ -1772,6 +1772,35 @@ class TestMore(TestCase):
 
         self.assertEqual(foo(), foo.py_func())
 
+    def test_unroll_indexing_list(self):
+        # See issue #5477
+        @njit
+        def foo(cont):
+            i = 0
+            acc = 0
+            normal_list = [a for a in cont]
+            heter_tuple = ('a', 25, 0.23, None)
+            for item in literal_unroll(heter_tuple):
+                acc += normal_list[i]
+                i += 1
+                print(item)
+            return i, acc
+
+        data = [j for j in range(4)]
+
+        # send stdout to nowhere, just check return values
+        with captured_stdout():
+            self.assertEqual(foo(data), foo.py_func(data))
+
+        # now capture stdout for jit function and check
+        with captured_stdout() as stdout:
+            foo(data)
+        lines = stdout.getvalue().splitlines()
+        self.assertEqual(
+            lines,
+            ['a', '25', '0.23', 'None'],
+        )
+
 
 def capture(real_pass):
     """ Returns a compiler pass that captures the mutation state reported

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc g++
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
exceptiongroup==1.2.2
importlib-metadata==6.7.0
iniconfig==2.0.0
llvmlite==0.32.1
-e git+https://github.com/numba/numba.git@917f582433170893f32ae51e5ca8fd8a8a736914#egg=numba
numpy==1.21.6
packaging==24.0
pluggy==1.2.0
pytest==7.4.4
tomli==2.0.1
typing_extensions==4.7.1
zipp==3.15.0

name: numba
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - argparse==1.4.0
      - exceptiongroup==1.2.2
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - llvmlite==0.32.1
      - numpy==1.21.6
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - zipp==3.15.0
prefix: /opt/conda/envs/numba

numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_indexing_list
numba/tests/test_mixed_tuple_unroller.py::TestLiteralTupleInterpretation::test_heterogeneous_literal numba/tests/test_mixed_tuple_unroller.py::TestLiteralTupleInterpretation::test_homogeneous_literal numba/tests/test_mixed_tuple_unroller.py::TestLiteralTupleInterpretation::test_non_literal numba/tests/test_mixed_tuple_unroller.py::TestLoopCanonicalisation::test_influence_of_typed_transform_literal_unroll numba/tests/test_mixed_tuple_unroller.py::TestLoopCanonicalisation::test_inlined_loops numba/tests/test_mixed_tuple_unroller.py::TestLoopCanonicalisation::test_simple_loop_in_depth numba/tests/test_mixed_tuple_unroller.py::TestLoopCanonicalisation::test_transform_scope numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_01 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_02 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_03 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_04 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_05 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_07 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_08 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_09 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_10 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_11 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_11a numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_12 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_13 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_14 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_15 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_16 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_17 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_18 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_19 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_20 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_21 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_22 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_23 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_24 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_25 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_26 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_27 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_28 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_29 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_30 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_31 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_32 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_33 numba/tests/test_mixed_tuple_unroller.py::TestMixedTupleUnroll::test_34 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_01 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_02 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_03 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_04 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_05 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_06 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_10 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_11 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_12 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_13 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_14 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_7 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_8 numba/tests/test_mixed_tuple_unroller.py::TestConstListUnroll::test_9 numba/tests/test_mixed_tuple_unroller.py::TestMore::test_inlined_unroll_list numba/tests/test_mixed_tuple_unroller.py::TestMore::test_invalid_use_of_unroller numba/tests/test_mixed_tuple_unroller.py::TestMore::test_non_constant_list numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_freevar_tuple numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_function_tuple numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_global_tuple numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_named_tuple numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_named_tuple_arg numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_named_unituple numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_named_unituple_arg numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_tuple_alias numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_tuple_arg numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_tuple_arg2 numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_tuple_nested numba/tests/test_mixed_tuple_unroller.py::TestMore::test_unroll_tuple_of_dict numba/tests/test_mixed_tuple_unroller.py::TestLiteralUnrollPassTriggering::test_literal_unroll_assess_empty_function numba/tests/test_mixed_tuple_unroller.py::TestLiteralUnrollPassTriggering::test_literal_unroll_globals_and_locals numba/tests/test_mixed_tuple_unroller.py::TestLiteralUnrollPassTriggering::test_literal_unroll_is_invoked numba/tests/test_mixed_tuple_unroller.py::TestLiteralUnrollPassTriggering::test_literal_unroll_is_invoked_via_alias numba/tests/test_mixed_tuple_unroller.py::TestLiteralUnrollPassTriggering::test_literal_unroll_not_in_globals numba/tests/test_mixed_tuple_unroller.py::TestLiteralUnrollPassTriggering::test_literal_unroll_not_invoked
README.rst buildscripts/condarecipe.local/meta.yaml setup.py requirements.txt numba/core/untyped_passes.py
README.rst buildscripts/condarecipe.local/meta.yaml setup.py requirements.txt numba/core/untyped_passes.py