<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/63831>63831</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            MI.getNumImplicitOperands() == 0 Assert in llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Caslyn
      </td>
    </tr>
</table>

<pre>
    The assert introduced in https://reviews.llvm.org/D154943 is firing on Fuchsia Linux/Mac/Windows clang builders:

```
assert(MI.getNumImplicitOperands() == 0 &&
 "MOVi32imm expected to have no implicit operands");
```

eg: 
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-xarm64/b8775779651113385393/overview
 

This is the error that gets emitted:
```
FAILED: compiler-rt/lib/xray/CMakeFiles/RTXrayBASIC.armhf.dir/xray_basic_logging.cpp.o 
/b/s/w/ir/x/w/llvm_build/./bin/clang++ --target=armv7-unknown-linux-gnueabihf --sysroot=/b/s/w/ir/x/w/cipd/linux -DSANITIZER_COMMON_NO_REDEFINE_BUILTINS -DXRAY_HAS_EXCEPTIONS=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/xray/.. -I/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/xray/../../include -resource-dir=/b/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/./lib/clang/17 --target=armv7-unknown-linux-gnueabihf -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/b/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins=../llvm_build/tools/clang/stage2-bins/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins -ffile-prefix-map=/b/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -Wall -Wno-unused-parameter -O2 -g -DNDEBUG -std=c++17 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -isystem/b/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/include/c++/v1 -isystem/b/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/include/armv7-unknown-linux-gnueabihf/c++/v1 -isystem/b/s/w/ir/x/w/llvm-llvm-project/libcxxabi/include -Wno-format -fno-rtti -MD -MT compiler-rt/lib/xray/CMakeFiles/RTXrayBASIC.armhf.dir/xray_basic_logging.cpp.o -MF compiler-rt/lib/xray/CMakeFiles/RTXrayBASIC.armhf.dir/xray_basic_logging.cpp.o.d -o compiler-rt/lib/xray/CMakeFiles/RTXrayBASIC.armhf.dir/xray_basic_logging.cpp.o -c /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/xray/xray_basic_logging.cpp
clang++: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1173: void (anonymous namespace)::ARMExpandPseudo::ExpandMOV32BitImm(MachineBasicBlock &, MachineBasicBlock::iterator &): Assertion `MI.getNumImplicitOperands() == 0 && "MOVi32imm expected to have no implicit operands"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
```

Reproducer attached below:

{F28213410}

@john-brawn-arm  - would you be able to take a look?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0WN1v4zgO_2vUF0FBYufzIQ9JHO8FaJKizW7n7iWQJcbmVpZ8kpyP_esPspNO2xn0dgczQODaFEnx40dKLHcOcw0wJYM5GSR3vPaFsdMFd-qi7zIjL9NdAZQ7B9ZT1N4aWQuQFDUtvK8ciWckSkmUWjginFxHqWPZMTYnUZr0Bv1JP6bo6AEt6pwaTdNaFA45vUddn0mUrrkgUfqMWpqTo0JxndOsRiXBNsq7CenensPu9dd8tkaRaLxedXLwm7pclZVCgX5bgeVaOhKNSTShJE5InNAuJdEw_BppSqJovf0D4wjLksK5AuFBUm9owY9AtaF41UbNq7qIRBMSz79rTvuEnMQz2r6_D5CqBbISlenwqnKV8R1hShKlNZIorUiUHtrIkCh99T9KvTFKFBx1RwS-Jj5MhdixM7flsB_Yx6PRYDSaDAe9Xi-Ox4N4EpMoNUewISc3f99YuSvQhbT4AihYayz1Bfc0B-8olOg9yK-xf-9mOlvdL5PgpDBlhQosC0lIFWYkSs-WX0iULtb8BVJUEFx43H2x_DKfPa0WHW7L4tCRaK-8-4w7FHtl8hx13hFV1TE3S6M0aAwaTiRKW5HrRwDZvokSidJO4ER9iw6J5iSaU8Y8tzl4EifclscRq_WLNid9DV6ua-AZFgfKmLs4a0zg_GxPgZVs_NT1mbLkabZZ7Vb_WT7uF9v1ervZb7b7x2WyTFeb5X7---p-t9o8UZZ8eZz9e_-v2dN--WWxfNittpsnEic9ypJ9spz__lt4-e1-NV98-bKfPT0tHxuWQA3Eh4f9cjOb3y8_rO2fdsliv9hunnazzW6_ni0et28W0u3jevYt-X61Xn2lrv5fhFnzqKz5E0RI8ScJ73R-tr7bA7VQtQTKLDhTWwEsoOfzVL2DR6gg9xUcqfM8h4hlqN0VPO3Ot_Xe6B9g5_C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