[llvm] [AArch64] Add CodeGen support for FEAT_CPA (PR #105669)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 09:31:11 PDT 2024


================
@@ -4081,8 +4087,15 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
       // For PIC, the sequence is:
       // BRIND(load(Jumptable + index) + RelocBase)
       // RelocBase can be JumpTable, GOT or some sort of global base.
-      Addr = DAG.getNode(ISD::ADD, dl, PTy, Addr,
-                          TLI.getPICJumpTableRelocBase(Table, DAG));
+      if (!DAG.getTarget().shouldPreservePtrArith(
----------------
arichardson wrote:

Can't we use `getMemBasePlusOffset` here?

https://github.com/llvm/llvm-project/pull/105669


More information about the llvm-commits mailing list