[PATCH] D34240: [WebAssembly] Expansion of llvm.umul.overflow with i64 type operands.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 11:01:36 PDT 2017


efriedma added a comment.

> earlier we were returning (i64,i64 BUILD_PAIR) when CallLoweringReturn

Despite the name, BUILD_PAIR does not return a pair.  It returns an i128.  It's essentially just a shortcut for `((zext Op1 to i128) << 64) | (zext Op0 to i128))` (see SelectionDAGLegalize::ExpandNode).  This is a node with an illegal result type, and we should not be creating it.

---

The changes you're making to LowerCallTo in the case where CanLowerReturn is false look good.

The part I'm not happy with is that LowerCallTo behaves inconsistently with your patch.  In the case where CanLowerReturn is true, we should split the returned value in the same way you're splitting it when CanLowerReturn is false.


https://reviews.llvm.org/D34240





More information about the llvm-commits mailing list