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

    <tr>
        <th>Summary</th>
        <td>
            error: Invalid cast (Producer: 'LLVM18.0.1' Reader: 'LLVM 18.0.1'
        </td>
    </tr>

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

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

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

<pre>
    Repro:

[beacon.i.txt](https://github.com/llvm/llvm-project/files/15068800/beacon.i.txt)

```
clang -c -msse3 -mstackrealign -O2 -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off -fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names -gz=zstd -no-canonical-prefixes -Wno-error=format -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto-var-init=zero -g -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -nostdlibinc -fdebug-info-for-profiling -m32 -march=prescott -target i686-linux-android10000 -fPIE -flto -fsanitize-cfi-cross-dso -fsanitize-ignorelist=external/compiler-rt/lib/cfi/cfi_blocklist.txt -fvisibility=default -fsanitize=cfi -fsanitize-trap=all -std=gnu17  -fcommon beacon.i
```

$ llvm-project/build/bin/opt -S beacon.o 
```
llvm-project/build/bin/opt: beacon.o: error: Invalid cast (Producer: 'LLVM18.0.1' Reader: 'LLVM 18.0.1')
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVN1u2zgTfRr6hhhDIi3_XPiirSogQD-kSL_dYq8CihzKs6VIgaQcJ0-_oBKnyaLAYoEFDNLkUGfmnPlRKdHgEY-s-ciadqXmfArxeKKoDOVHteqDeTze4RQDkx9Y1bLqujYfe1Q6-DWt8yWzpmVif8p5SuWh6JjoBsqnuV_rMDLROX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