aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2022-03-16 11:21:27 -0700
committerArthur Eubanks <aeubanks@google.com>2022-03-16 14:11:53 -0700
commit2371c5a0e06d22b48da0427cebaf53a5e5c54635 (patch)
tree7a6f521c72aba15d6de20f69dd43e3aa9e2178a9 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent65370702b82f7249c2e3fb77412cd484f62a7845 (diff)
downloadllvm-2371c5a0e06d22b48da0427cebaf53a5e5c54635.zip
llvm-2371c5a0e06d22b48da0427cebaf53a5e5c54635.tar.gz
llvm-2371c5a0e06d22b48da0427cebaf53a5e5c54635.tar.bz2
[OpaquePtr][ARM] Use elementtype on ldrex/ldaex/stlex/strex
Includes verifier changes checking the elementtype, clang codegen changes to emit the elementtype, and ISel changes using the elementtype. Basically the same as D120527. Reviewed By: #opaque-pointers, nikic Differential Revision: https://reviews.llvm.org/D121847
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 3ad5fd7..afe18c5 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -52,6 +52,7 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAArch64.h"
+#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
@@ -4144,11 +4145,23 @@ Error BitcodeReader::propagateAttributeTypes(CallBase *CB,
case Intrinsic::aarch64_ldaxr:
case Intrinsic::aarch64_ldxr:
case Intrinsic::aarch64_stlxr:
- case Intrinsic::aarch64_stxr: {
- unsigned ArgNo = CB->getIntrinsicID() == Intrinsic::aarch64_stlxr ||
- CB->getIntrinsicID() == Intrinsic::aarch64_stxr
- ? 1
- : 0;
+ case Intrinsic::aarch64_stxr:
+ case Intrinsic::arm_ldaex:
+ case Intrinsic::arm_ldrex:
+ case Intrinsic::arm_stlex:
+ case Intrinsic::arm_strex: {
+ unsigned ArgNo;
+ switch (CB->getIntrinsicID()) {
+ case Intrinsic::aarch64_stlxr:
+ case Intrinsic::aarch64_stxr:
+ case Intrinsic::arm_stlex:
+ case Intrinsic::arm_strex:
+ ArgNo = 1;
+ break;
+ default:
+ ArgNo = 0;
+ break;
+ }
if (!Attrs.getParamElementType(ArgNo)) {
Type *ElTy = getPtrElementTypeByID(ArgTyIDs[ArgNo]);
if (!ElTy)