[PATCH] D114357: [CodeGen][AArch64] Ensure isSExtCheaperThanZExt returns true for negative constants
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 00:32:46 PST 2022
mstorsjo added a comment.
I've bisected a miscompilation to this file.
To reproduce:
$ git clone git://source.ffmpeg.org/ffmpeg
$ cd ffmpeg
$ ./configure --cc=clang --samples=$(pwd)/../samples
$ make fate-rsync
$ make -j$(nproc)
$ make fate-dpcm-interplay
The breakage happens in the libavformat/ipmovie.c file. (I also saw a couple other broken tests, so I think there are other source files affected too, but I didn't bisect and pinpoint those failures.)
The issue can be observed with https://martin.st/temp/ipmovie-preproc.c, with `clang -target aarch64-linux-gnu -O3 -o - ipmovie-preproc.c`. The generated code contains differences like this:
--- old.s 2022-01-18 10:30:24.726016244 +0200
+++ new.s 2022-01-18 10:30:01.650536299 +0200
@@ -506,7 +506,7 @@
mov w1, #56
bl av_log
add x9, x19, #1104
- mov w21, #65535
+ mov w21, #-1
.LBB3_9: // %while.end
ldr x0, [x19]
ldr w8, [x0, #44]
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114357/new/
https://reviews.llvm.org/D114357
More information about the llvm-commits
mailing list