[PATCH] D110862: X86InstrInfo: Look across basic blocks in optimizeCompareInstr

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 10:57:09 PDT 2021


MatzeB marked 2 inline comments as done.
MatzeB added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4291
 
-  // Search backward from CmpInstr for the next instruction defining EFLAGS.
+  // Search backward from CmpInstr for the next instruction producing EFLAGS.
   const TargetRegisterInfo *TRI = &getRegisterInfo();
----------------
craig.topper wrote:
> Should this be in the first patch where this comment was created?
just dropped the change instead.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4476-4479
+    // Only move within the same block so we don't accidentally move to a
+    // block with higher execution frequency.
+    if (&CmpMBB != SubBB)
+      return false;
----------------
pengfei wrote:
> Do we have a test for it?
Added one.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110862/new/

https://reviews.llvm.org/D110862



More information about the llvm-commits mailing list