diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -1002,11 +1002,11 @@ EVT VT = Op.getValueType(); assert(ES->getTargetFlags() == 0 && "Unexpected target flags on generic ExternalSymbolSDNode"); - // Set the TargetFlags to 0x1 which indicates that this is a "function" - // symbol rather than a data symbol. We do this unconditionally even though - // we don't know anything about the symbol other than its name, because all - // external symbols used in target-independent SelectionDAG code are for - // functions. + // Set the TargetFlags to MO_SYMBOL_FUNCTION which indicates that this is a + // "function" symbol rather than a data symbol. We do this unconditionally + // even though we don't know anything about the symbol other than its name, + // because all external symbols used in target-independent SelectionDAG code + // are for functions. return DAG.getNode( WebAssemblyISD::Wrapper, DL, VT, DAG.getTargetExternalSymbol(ES->getSymbol(), VT, diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td @@ -179,9 +179,6 @@ def : LoadPatGlobalAddr; def : LoadPatGlobalAddr; -def : LoadPatExternalSym; -def : LoadPatExternalSym; - // Select loads with just a constant offset. def : LoadPatOffsetOnly; def : LoadPatOffsetOnly; @@ -285,16 +282,6 @@ def : LoadPatGlobalAddr; def : LoadPatGlobalAddr; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; - // Extending loads with just a constant offset def : LoadPatOffsetOnly; def : LoadPatOffsetOnly; diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td @@ -102,15 +102,6 @@ def : LoadPatGlobalAddr; def : LoadPatGlobalAddr; -class LoadPatExternalSym : - Pat<(ty (kind (add I32:$addr, (WebAssemblywrapper texternalsym:$off)))), - (inst 0, texternalsym:$off, I32:$addr)>; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; - - // Select loads with just a constant offset. class LoadPatOffsetOnly : Pat<(ty (kind imm:$off)), (inst 0, imm:$off, (CONST_I32 0))>; @@ -196,18 +187,6 @@ def : LoadPatGlobalAddr; def : LoadPatGlobalAddr; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; - - // Select extending loads with just a constant offset. def : LoadPatOffsetOnly; def : LoadPatOffsetOnly; @@ -269,11 +248,6 @@ def : LoadPatGlobalAddr; def : LoadPatGlobalAddr; def : LoadPatGlobalAddr; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; -def : LoadPatExternalSym; // Select "don't care" extending loads with just a constant offset. def : LoadPatOffsetOnly; diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td @@ -57,7 +57,6 @@ def : LoadPatImmOff("LOAD_"#vec_t)>; def : LoadPatImmOff("LOAD_"#vec_t)>; def : LoadPatGlobalAddr("LOAD_"#vec_t)>; -def : LoadPatExternalSym("LOAD_"#vec_t)>; def : LoadPatOffsetOnly("LOAD_"#vec_t)>; def : LoadPatGlobalAddrOffOnly("LOAD_"#vec_t)>; def : LoadPatExternSymOffOnly("LOAD_"#vec_t)>;