Open
Description
Edit 2024-01-31: We should replace Fragment FlowGraphBuilder::BoolToInt
to use BoolToIntInstr
and implement BoolToIntInstr
on the other platforms.
===== Old description =====
We could consider making IfThenElseInstr
support unboxed output values.
It would remove two shifts (and a move) from the below code generated in FFI trampolines (after CL).
;; v111 <- IfThenElse(===, v12 T{*}, v41 ? 1 : 0) T{_Smi}
0x7f92e71a89e2 4833d2 xorq rdx,rdx
0x7f92e71a89e5 493b9ed0000000 cmpq rbx,[thr+0xd0] true
0x7f92e71a89ec 0f94c2 setzl rdx
0x7f92e71a89ef 48d1e2 shlq rdx,1
;; ParallelMove rbx <- rdx
0x7f92e71a89f2 4889d3 movq rbx,rdx
;; v77 <- UnboxUint32([tr], [non-speculative], v111) T{int}
0x7f92e71a89f5 48d1fb sarq rbx,1