[PowerPC] Fix L[D|W]ARX Implementation
authorAlbion Fung <albionapc@gmail.com>
Tue, 13 Jul 2021 16:01:53 +0000 (11:01 -0500)
committerAlbion Fung <albionapc@gmail.com>
Tue, 13 Jul 2021 16:02:07 +0000 (11:02 -0500)
commitf1aca5ac96ebd0beadfa68a474c5947d3bc8c109
tree34b5182ab9c0b9ad5a46d286cce02b8b7d1a31c3
parent4975837f1480621d9428a4be468831d07b2201de
[PowerPC] Fix L[D|W]ARX Implementation

LDARX and LWARX sometimes gets optimized out by the compiler
when it is critical to the correctness of the code. This inline asm generation
ensures that it preserved.

Differential Revision: https://reviews.llvm.org/D105754
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond-64bit-only.c
clang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond.c
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-LoadReserve-StoreCond-64bit-only.ll
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-LoadReserve-StoreCond.ll