CodeGen: it turns out that NAND is not the same thing as BIC. At all.
authorTim Northover <tnorthover@apple.com>
Mon, 7 Jul 2014 09:06:35 +0000 (09:06 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 7 Jul 2014 09:06:35 +0000 (09:06 +0000)
commit3e16b022be11d0ab22a726ab8e97cda083b32cd7
treebb81d906acfdf2d01b893a775dc3a1ee0e4b1168
parent682e019983ba91576ecf02a0dd93edfde0d705f3
CodeGen: it turns out that NAND is not the same thing as BIC. At all.

We've been performing the wrong operation on ARM for "atomicrmw nand" for
years, since "a NAND b" is "~(a & b)" rather than ARM's very tempting "a & ~b".
This bled over into the generic expansion pass.

So I assume no-one has ever actually tried to do an atomic nand in the real
world. Oh well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212443 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AtomicExpandLoadLinkedPass.cpp
lib/Target/X86/X86FastISel.cpp
test/CodeGen/AArch64/arm64-atomic-128.ll
test/CodeGen/AArch64/arm64-atomic.ll
test/Transforms/AtomicExpandLoadLinked/ARM/atomic-expansion-v7.ll