[PATCH] D91432: Move GlobalTLSAddress handling to WebAssemblyISelLowering. NFC
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 11:37:55 PST 2020
sbc100 added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td:355-359
+def : Pat<(i32 (WebAssemblywrapper tglobaltlsaddr:$addr)),
+ (CONST_I32 tglobaltlsaddr:$addr)>, Requires<[HasAddr32]>;
+def : Pat<(i64 (WebAssemblywrapper tglobaltlsaddr:$addr)),
+ (CONST_I64 tglobaltlsaddr:$addr)>, Requires<[HasAddr64]>;
+
----------------
tlively wrote:
> IIUC, these aren't currently used because the lowering generates a MachineNode directly, right?
No these are used. I don't generate the Const as MachineNodes, only the global get they get added to.
These two lines require these patterns:
```
SDValue TLSOffset = DAG.getTargetGlobalAddress(
GV, DL, PtrVT, GA->getOffset(), WebAssemblyII::MO_TLS_BASE_REL);
SDValue SymAddr = DAG.getNode(WebAssemblyISD::Wrapper, DL, PtrVT, TLSOffset);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91432/new/
https://reviews.llvm.org/D91432
More information about the llvm-commits
mailing list