Repository navigation
x64: add APX NDD lowering for simple integer binary ops - #14930
Conversation
709b053 to
67fea8c
Compare
|
Note that this patch, and none of the patches to come based on #14969, are gated on the regalloc work bytecodealliance/regalloc2#267 and can go in before. |
fitzgen
left a comment
There was a problem hiding this comment.
It would be interesting to check in instruction encoding whether the first operand and destination are (1) actually different registers or (2) in the new register set, and if neither is true then we should be able to use an old (more compact) encoding, correct? This would require a bit more machinery than currently exists, as I believe that we go immediately from MInst to assembler instruction encoding automatically, but seems like something that we should have a tracking issue for and would probably want to have before enabling APX by default on supported hardware.
|
@fitzgen .. Yes it should be better to use the compact representation when we can and for some instructions it doesn't even need to be the first source. Yes, can create a tracking issue and I agree with your last point .. we need to get APX implemented but we should understand that it will need this kind of scrutiny before enabling by default. They'll be other gotchas that could bring slight hit on APX support hardware instead of helping. |
First of a series splitting #14696 into one PR per instruction class. Adds the
APX NDD (new data destination) forms of
sub,and,orandxorfor 64-bitregister-register ops, following the pattern #13916 established for
add: anRVMencoding promoted into EVEX map 4 withND = 1, plus a lowering ruleguarded on
use_apx. The separate destination means the register allocator nolonger needs a move to preserve a live input.
has_apxis off by default, sonothing changes unless it's enabled. More NDD patches to follow.