nikic wrote: After much suffering, I managed to do a stage2+thinlto build in a Windows VM. I believe this is the root cause:
```llvm ; RUN: opt -S -passes=memcpyopt < %s declare void @init(ptr) declare void @update(ptr) define i32 @test() { %a = alloca i32 %b = alloca i32 call void @init(ptr captures(none) %a) call void @llvm.memcpy(ptr %b, ptr %a, i64 4, i1 false) call void @update(ptr captures(ret: address, provenance) %b) %v = load i32, ptr %a ret i32 %v } ``` The `%a` and `%b` allocas get combined and memcpy optimized out. https://github.com/llvm/llvm-project/pull/125880 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits