[PATCH] D120527: [OpaquePtr][AArch64] Use elementtype on ldxr/stxr

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 25 01:18:37 PST 2022


nikic added a comment.

An alternative I suggested on https://github.com/llvm/llvm-project/issues/51165 was to overload these intrinsics by result/value type. I think that would be cleaner design-wise, but it also seems harder to implement (requires custom ISD nodes), so I'm okay with the elementtype approach.



================
Comment at: llvm/lib/IR/Verifier.cpp:5508
+               ->isOpaqueOrPointeeTypeMatches(ElemTy),
+           "elementtype/pointee type mismatch");
+    break;
----------------
This is checked generically for all elementtype attributes. You can also merge this into the previous switch case.


================
Comment at: llvm/test/Verifier/AArch64/lit.local.cfg:2
+if not 'AArch64' in config.root.targets:
+    config.unsupported = True
----------------
This is unnecessary, target intrinsics are available even if the target isn't.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120527/new/

https://reviews.llvm.org/D120527



More information about the cfe-commits mailing list