[llvm] [MachineInstr] add insert method for variadic instructions (PR #67699)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 10:11:15 PDT 2023


nickdesaulniers wrote:

> Spooky, looks like my newly added tests are failing in presubmit.

Still a draft because of this. I wonder if my non-`MachineInstrBuilder` raw usage of the `MachineInstr` is problematic.

FWICT, these two lines will sometimes crash (sometimes depends which):
```c++
MI->getOperand(0).ChangeToRegister(1, /*isDef=*/true);                                                                                     
MI->getOperand(1).ChangeToRegister(2, /*isDef=*/false);
```
I wonder if `-DLLVM_ENABLE_ASSERTIONS=ON` isn't being applied to the unittests?

https://github.com/llvm/llvm-project/pull/67699


More information about the llvm-commits mailing list