[PATCH] D142166: [X86] Make `shouldExpandLogicAtomicRMWInIR` able to match both operands.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 08:56:20 PST 2023


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/atomic-rm-bit-test-64.ll:1474
   %0 = atomicrmw xor ptr %v, i64 16 monotonic, align 8
-  %and = and i64 %0, 16
+  %and = and i64 16, %0
   %tobool.not = icmp eq i64 %and, 0
----------------
I'd expect DAG canonicalization to commute this in DAGCombiner::visitAND?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142166



More information about the llvm-commits mailing list