[llvm] [AArch64][GlobalISel] Fix miscompile on carry-in selection (PR #68840)
Tobias Stadler via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 16:39:27 PDT 2023
================
@@ -3552,6 +3557,13 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
return false;
}
+bool AArch64InstructionSelector::selectAndRestoreState(MachineInstr &I) {
+ MachineIRBuilderState OldMIBState = MIB.getState();
+ bool Success = select(I);
+ MIB.getState() = std::move(OldMIBState);
----------------
tobias-stadler wrote:
What about the DebugLoc? It has a TrackingMDRef, which does seem to benefit from moving, because it can call MetadataTracking::retrack(). I don't understand the details of MetadataTracking though.
https://github.com/llvm/llvm-project/pull/68840
More information about the llvm-commits
mailing list