[all-commits] [llvm/llvm-project] b3b25a: [llvm][gvn-sink] Don't try to sink inline asm
Paul Kirth via All-commits
all-commits at lists.llvm.org
Sun May 4 10:23:03 PDT 2025
Branch: refs/heads/users/ilovepi/gvn-sink-bug
Home: https://github.com/llvm/llvm-project
Commit: b3b25a5cc22ad1167f565755efa0420e0afd2a5d
https://github.com/llvm/llvm-project/commit/b3b25a5cc22ad1167f565755efa0420e0afd2a5d
Author: Paul Kirth <paulkirth at google.com>
Date: 2025-05-04 (Sun, 04 May 2025)
Changed paths:
M llvm/lib/Transforms/Scalar/GVNSink.cpp
M llvm/lib/Transforms/Utils/Local.cpp
A llvm/test/Transforms/GVNSink/pr138345.ll
Log Message:
-----------
[llvm][gvn-sink] Don't try to sink inline asm
Fixes #138345. Before this patch, gvn-sink would try to sink inline
assembly statements. Other GVN passes avoid them (see
https://github.com/llvm/llvm-project/blob/b4fac94181c4cf17dbb7ecc2ae975712b0e4a6d1/llvm/lib/Transforms/Scalar/GVN.cpp#L2932
Similarly, gvn-sink should skip these instructions, since they are not
safe to move. We also update the early exit in
canReplaceOperandWithVariable, since it should have caught this case.
We keep the new logic in GVNSink.cpp, since its more efficient to skip
numbering those instructions.
The test added is reduced from a failure when compiling Fuchsia. There
were two distinct failure modes. One occurred when only running gvn-sink
alone, but a different failure happened when running
correlated-propagation afterwards.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list