[IR][OpaquePointers] Properly print cmpxchg with pointer operands.
authorDenis Antrushin <dantrushin@gmail.com>
Thu, 7 Jul 2022 07:18:06 +0000 (14:18 +0700)
committerDenis Antrushin <dantrushin@gmail.com>
Thu, 7 Jul 2022 14:18:31 +0000 (17:18 +0300)
commit26f369393d4e60c78d872c4cafcbf3fd929b9004
tree034090621fbceaefc458ec1a8238e177c72b6219
parent479c4f648a021f1efdc30312bab804a71447e15f
[IR][OpaquePointers] Properly print cmpxchg with pointer operands.

With opaque pointers address of pointer variable and its value have
same type (`ptr`). As a result, cmpxchg is printed without values
types in LLVM assembly and cannot be read back. Add AtomicCmpXchg
to the list of instructions which always have operand types printed.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D129276
llvm/lib/IR/AsmWriter.cpp
llvm/test/Assembler/opaque-ptr.ll