[PATCH] D96205: [WebAssembly] Fix multiclass template parameter types. NFC.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 6 10:38:21 PST 2021


RKSimon added a comment.

Cheers @aheejin  - you can review these changes by applying the patch from D95874 <https://reviews.llvm.org/D95874> against trunk to see the error messages.



================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td:70
 // Select loads with no constant offset.
-multiclass LoadPatNoOffset<ValueType ty, PatFrag kind, string inst> {
+multiclass LoadPatNoOffset<ValueType ty, SDPatternOperator kind, string inst> {
   def : Pat<(ty (kind I32:$addr)), (!cast<NI>(inst # "_A32") 0, 0, I32:$addr)>,
----------------
aheejin wrote:
> Why should this be `SDPatternOperator`? What we put here seems `load`, which is a subclass of `PatFrag`. The same question for other `LoadPat***` changes.
IIRC this was necessary for some of the uses in WebAssemblyInstrSIMD.td


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td:311
 // Select loads with no constant offset.
-multiclass LoadLanePatNoOffset<Vec vec, PatFrag kind> {
+multiclass LoadLanePatNoOffset<Vec vec, SDPatternOperator kind> {
   defvar load_lane_a32 = !cast<NI>("LOAD_LANE_"#vec#"_A32");
----------------
aheejin wrote:
> This seems to be the same case as `StoreLanePatNoOffset`, in which your suggestion was `Intrinsic`..?
A few multiclasses I was to get to work by keeping the more specialized Intrinsic type, in others it was necessary to generalise all the way to SDPatternOperator.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96205



More information about the llvm-commits mailing list