[PATCH] D137824: [WebAssembly] multivalue stackify fix

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 03:23:26 PST 2022


samparker added a comment.

> I don't know if you've seen it, but we have a multivalue-stackify.py script that tries to exhaustively enumerate multivalue sequences up to a certain size then filter out the uninteresting ones.

Cool! My python isn't great tbh... but looking through the generated test, I would have thought that `f141` may have triggered this bug:

  %t0 = call {i32, i32} @op_0_to_2()
  %t1 = extractvalue {i32, i32} %t0, 1
  call void @op_1_to_0(i32 %t1)
  %t2 = extractvalue {i32, i32} %t0, 0
  call void @op_1_to_0(i32 %t2)
  ret void

  %0:i32, %1:i32 = CALL @op_0_to_2, implicit-def dead $arguments, implicit $sp32, implicit $sp64, implicit-def dead $arguments, implicit $sp32, implicit $sp64
  CALL @op_1_to_0, %1, implicit-def dead $arguments, implicit $sp32, implicit $sp64, implicit-def dead $arguments, implicit $sp32, implicit $sp64
  CALL @op_1_to_0, %0, implicit-def dead $arguments, implicit $sp32, implicit $sp64, implicit-def dead $arguments, implicit $sp32, implicit $sp64
  RETURN implicit-def dead $arguments

Is it the fact that the users are calls and this prevents a move from being attempted..?


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

https://reviews.llvm.org/D137824



More information about the llvm-commits mailing list