aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2018-02-12 17:03:11 +0000
committerOliver Stannard <oliver.stannard@arm.com>2018-02-12 17:03:11 +0000
commit02f08c9d1f9beb60c88522b3f9e75462d85dc06e (patch)
tree9e7e577e1af646120119cc488e1878d73c7cd4e5 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent93e58667ee1030f36affff0cc5c43e404be19523 (diff)
downloadllvm-02f08c9d1f9beb60c88522b3f9e75462d85dc06e.zip
llvm-02f08c9d1f9beb60c88522b3f9e75462d85dc06e.tar.gz
llvm-02f08c9d1f9beb60c88522b3f9e75462d85dc06e.tar.bz2
[AArch64] Improve v8.1-A code-gen for atomic load-and
Armv8.1-A added an atomic load-clear instruction (which performs bitwise and with the complement of it's operand), but not a load-and instruction. Our current code-generation for atomic load-and always inserts an MVN instruction to invert its argument, even if it could be folded into a constant or another instruction. This adds lowering early in selection DAG to convert a load-and operation into an xor with -1 and a load-clear, allowing the normal DAG optimisations to work on it. To do this, I've had to add a new ISD opcode, ATOMIC_LOAD_CLR. I don't see any easy way to do this with an AArch64-specific ISD node, because the code-generation for atomic operations assumes the SDNodes are of type AtomicSDNode. I've left the old tablegen patterns in because they are still needed for global isel. Differential revision: https://reviews.llvm.org/D42478 llvm-svn: 324908
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions