[all-commits] [llvm/llvm-project] 2e2520: Make `shouldExpandLogicAtomicRMWInIR` able to matc...

goldsteinn via All-commits all-commits at lists.llvm.org
Sat Jan 21 00:59:04 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e25204779e5b972d668bf66a0014c1325813b35
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-01-21 (Sat, 21 Jan 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/atomic-rm-bit-test-64.ll
    M llvm/test/CodeGen/X86/atomic-rm-bit-test.ll

  Log Message:
  Make `shouldExpandLogicAtomicRMWInIR` able to match both operands.

Previous logic was buggy and erroneously asserted that I->operand(0) must
be the RMW instruction. This change fixes that and makes it so that the
RMW instruction can be used in operand 0 or 1.

Also update the tests to explicitly test RMW as operand 0/1 (no change
to codegen).

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D142166

More information about the All-commits mailing list