[llvm] [GlobalISel] Fix volatile flag handling in memmove legalizer (PR #206025)
Ömer Sinan Ağacan via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 01:59:55 PDT 2026
================
@@ -55,6 +55,30 @@
ret void
}
+ define void @test_memcpy_load_store_offsets_1(ptr nocapture %dst, ptr nocapture readonly %src) local_unnamed_addr #0 {
+ entry:
+ tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %dst, ptr align 8 %src, i64 3, i1 false)
+ ret void
+ }
+
+ define void @test_memcpy_load_store_offsets_2(ptr nocapture %dst, ptr nocapture readonly %src) local_unnamed_addr #0 {
+ entry:
+ tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %dst, ptr align 8 %src, i64 7, i1 false)
+ ret void
+ }
+
+ define void @test_memcpy_load_store_offsets_volatile_1(ptr nocapture %dst, ptr nocapture readonly %src) local_unnamed_addr #0 {
+ entry:
+ tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %dst, ptr align 8 %src, i64 3, i1 true)
+ ret void
+ }
+
+ define void @test_memcpy_load_store_offsets_volatile_2(ptr nocapture %dst, ptr nocapture readonly %src) local_unnamed_addr #0 {
----------------
osa1 wrote:
I'm still new to the project so I may be missing something, but I was able to quickly update these test files thanks to the IRs. Without IRs it'd be much more difficult.
(I copied the exising IRs and updated them, compiled them to MIRs until the tested pass, copied the MIRs to the file, generated CHECKs)
The main advantage is that the IR has a langref and many other examples/documentation so it's easy to hand-write. For MIR you have to figure it out yourself from tests and maybe from the MIR printer/parser code.
Wouldn't omitting IRs make it more difficult to work on the tests?
I'm still happy to update these two files to remove the IRs (IR references in these MIRs are easy to fix) in a separate PR, but I'd like to understand why we're doing it first.
I'd also like to understand why we want end-to-end tests here but not in some of the other tests, e.g. you also reviewed PR 206908 but didn't ask for an end-to-end test there.
(Again, I'm happy to update, just trying to understand and learn.)
https://github.com/llvm/llvm-project/pull/206025
More information about the llvm-commits
mailing list