[PATCH] D116375: [X86] Use bit test instructions to optimize some logic atomic operations

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 04:43:36 PST 2022


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86AtomicANDHoist.cpp:61
+      Changed = true;
+      And->moveAfter(AI);
+    }
----------------
craig.topper wrote:
> It might not be safe to move the And if the other operand isn't a constant. There's no guarantee that the atomic instruction occurs after the source of the other operand.
Makes sense. Thank you!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116375



More information about the llvm-commits mailing list