[all-commits] [llvm/llvm-project] 08dcbe: [BOLT] Fix X86MCPlusBuilder::replaceRegWithImm
Amir Ayupov via All-commits
all-commits at lists.llvm.org
Mon Feb 28 19:25:00 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 08dcbed92ff99945384311d64225c5cb3d78e79f
https://github.com/llvm/llvm-project/commit/08dcbed92ff99945384311d64225c5cb3d78e79f
Author: Amir Ayupov <aaupov at fb.com>
Date: 2022-02-28 (Mon, 28 Feb 2022)
Changed paths:
M bolt/lib/Target/X86/X86MCPlusBuilder.cpp
M bolt/test/X86/tail-duplication-prop-bug.s
M bolt/unittests/Core/MCPlusBuilder.cpp
Log Message:
-----------
[BOLT] Fix X86MCPlusBuilder::replaceRegWithImm
Reassigning the operand didn't update the operand type which resulted in an
assertion (`Assertion `isReg() && "This is not a register operand!"' failed.`)
Reset the instruction instead.
Test Plan:
```
ninja check-bolt
...
PASS: BOLT-Unit :: Core/./CoreTests/X86/MCPlusBuilderTester.ReplaceRegWithImm/0 (90 of 136)
```
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D120263
More information about the All-commits
mailing list