[PATCH] D45823: [X86] Fix Update Kill Register in Avoid SFB Pass - Bug 37153

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 09:53:50 PDT 2018


craig.topper added a comment.

I thought I wrote this comment when I reviewed yesterday, but I guess it didnt' get saved somehow.



================
Comment at: lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp:406
           MBB->getParent()->getMachineMemOperand(LMMO, LMMOffset, Size));
-  DEBUG(LoadInst->getPrevNode()->dump());
+  MachineInstr *NewLoad = LoadInst->getPrevNode();
+  if (LoadBase.isReg())
----------------
Can you do

```
MachineInstr *NewLoad = BuildMI....
```

Then you don't need to use getPrevNode. same with the store below.


https://reviews.llvm.org/D45823





More information about the llvm-commits mailing list