[PATCH] D53625: [WebAssembly] General vector shift lowering
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 10:04:23 PDT 2018
tlively marked 2 inline comments as done.
tlively added inline comments.
================
Comment at: lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1034
+ !(SplatVal = ShiftVec->getSplatValue()))
+ return DAG.UnrollVectorOp(Op.getNode());
+
----------------
aheejin wrote:
> On an unrelated note, maybe we can use this function again to conditionally expand `extract_lane`?
`UnrollVectorOp` uses `extract_lane` to apply the op to each lane individually, so it can't be used to lower `extract_lane` itself. But D53964 has a similarly simple solution.
================
Comment at: lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1036
+
+ // Non-const splats are handled by patterns, except for i64x2
+ ConstantSDNode *SplatConst = dyn_cast<ConstantSDNode>(SplatVal);
----------------
aheejin wrote:
> Do we have test cases for non-const splat?
Yes, see `@splat_XXX` functions in simd.ll.
Repository:
rL LLVM
https://reviews.llvm.org/D53625
More information about the llvm-commits
mailing list