[llvm] [IR] llvm.reloc.none intrinsic for no-op symbol references (PR #147427)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 22:04:22 PDT 2025
================
@@ -7750,6 +7750,17 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
return;
}
+ case Intrinsic::reloc_none: {
+ SDValue V = getValue(I.getArgOperand(0));
+ const auto *GA = cast<GlobalAddressSDNode>(V);
+ SDValue Ops[2];
+ Ops[0] = getRoot();
+ Ops[1] = DAG.getTargetGlobalAddress(GA->getGlobal(), sdl, V.getValueType(),
+ GA->getOffset());
----------------
arsenm wrote:
```suggestion
SDValue Ops[2] = {
getRoot(),
DAG.getTargetGlobalAddress(GA->getGlobal(), sdl, V.getValueType(),
GA->getOffset() };
```
https://github.com/llvm/llvm-project/pull/147427
More information about the llvm-commits
mailing list