[llvm] [AggressiveInstCombine] Inline strcmp/strncmp (PR #89371)

Franklin Zhang via llvm-commits llvm-commits at lists.llvm.org
Sun May 5 23:11:25 PDT 2024


FLZ101 wrote:

> This caused a miscompile in ffmpeg for x86 platforms.
> 
> It's reproducible on both Linux and MinGW, for both i686 and x86_64. To reproduce on linux on x86:
> 
> ```
> $ git clone https://github.com/ffmpeg/ffmpeg
> $ mkdir ffmpeg-build
> $ cd ffmpeg-build
> $ ../ffmpeg/configure --cc=clang --samples=$(pwd)/../samples
> $ make fate-rsync # download test samples
> $ make -j$(nproc) fate-subtitles
> ```
> 
> The miscompilation lies in the object file `libavformat/subtitles.o`.
> 
> I presume we should revert this until the issue has been resolved?

I'll check this issue soon.

This optimization could be disabled by specifying "-mllvm -strncmp-inline-threshold=0" and/or "-Wl,-mllvm,-strncmp-inline-threshold=0".

https://github.com/llvm/llvm-project/pull/89371


More information about the llvm-commits mailing list