Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Type the return of InvokeStaticFunction in LIR
Summary: This ended up biting me while I was working on de-stringifying IntBinaryOp. I was getting a crash in `make testcinder_jit` due to an invalid `imul bl, cl` instruction being generated (8-bit imul has to use ax and al). I tracked down the issue to this small repro, P580265190. Note how IntBinaryOp is getting a value that comes from an InvokeStaticFunction. In HIR, the return value is typed as CInt8, but the LIR generator generated `Mul RAX:Object, RCX:8bit`. This means the `rewriteByteMultiply` function in postalloc.cpp (https://fburl.com/code/770swxgu) can't kick in for cases like this because the first operand is not being correctly typed as an 8-bit argument. Adding the return type to the Call generated for the InvokeStaticFunction fixes the crash for me. Test Plan: `make -j testcinder_jit`, both with and without changes to use `BasicBlockBuilder.appendInstr()` for IntBinaryOp in D42143109. Reviewers: jbower, carljm, #cinderjit Reviewed By: carljm Differential Revision: https://phabricator.intern.facebook.com/D42143037 Tags: cinder-310-exclusive
- Loading branch information