[llvm] [AArch64][GlobalISel] Fix miscompile on carry-in selection (PR #68840)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 16:21:17 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);
----------------
aemerson wrote:
Just add a `setState()` instead? The state can be copied by value, it's just some pointers and an iterator.
https://github.com/llvm/llvm-project/pull/68840
More information about the llvm-commits
mailing list