<div dir="ltr">Yes, the CodeGenDAGPatterns is exactly right. Try applying the patch below and rebuilding and you'll see what I mean about the error messages ;) That being said, I'm sympathetic to Matt's point about shifting effort to GlobalISel. Maybe it has similar problems you could work on? A nicer development experience would certainly be a good carrot to get me excited to switch over sooner.<div><br></div><div>--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td<br>+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td<br>@@ -413,7 +413,7 @@ defm SHUFFLE :<br> def wasm_shuffle_t : SDTypeProfile<1, 18, []>;<br> def wasm_shuffle : SDNode<"WebAssemblyISD::SHUFFLE", wasm_shuffle_t>;<br> foreach vec_t = [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64] in {<br>-def : Pat<(vec_t (wasm_shuffle (vec_t V128:$x), (vec_t V128:$y),<br>+def : Pat<(vec_t (wasm_shuffle V128:$x, (vec_t V128:$y),<br> (i32 LaneIdx32:$m0), (i32 LaneIdx32:$m1),<br> (i32 LaneIdx32:$m2), (i32 LaneIdx32:$m3),<br> (i32 LaneIdx32:$m4), (i32 LaneIdx32:$m5),<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 18, 2020 at 12:42 PM Paul C. Anagnostopoulos <<a href="mailto:paul@windfall.com">paul@windfall.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Are you talking about the type checking done in CodeGenDAGPatterns.cpp? Is it easy to post an example?<br>
<br>
At 11/18/2020 01:55 PM, Thomas Lively wrote:<br>
>Hi Paul,<br>
><br>
>I think this would be time well spent. At least in the WebAssembly backend, the vast majority of our ISel work is still done with DAG ISel. I know this is different from the performance work you have in mind, but one of my biggest pain points working on LLVM so far has been the poor error messages from the DAG ISel pattern type checker. If you could find time to improve those error messages, I would be extremely grateful.<br>
><br>
>Thanks,<br>
><br>
>Thomas<br>
<br>
</blockquote></div>