From: "Zebediah Figura (she/her)" Subject: Re: [PATCH vkd3d 3/6] vkd3d-shader/hlsl: Write SM4 unsigned multiplication instructions. Message-Id: Date: Tue, 25 Jan 2022 15:26:12 -0600 In-Reply-To: <0b610e73-f384-50f8-8923-6edd0b6a0407@codeweavers.com> References: <20220125110753.1358613-1-gmascellani@codeweavers.com> <20220125110753.1358613-3-gmascellani@codeweavers.com> <4aa2945e-be6c-52f4-e130-94c7848f93c4@codeweavers.com> <0b610e73-f384-50f8-8923-6edd0b6a0407@codeweavers.com> On 1/25/22 14:19, Giovanni Mascellani wrote: > Hi, > > Il 25/01/22 20:06, Zebediah Figura (she/her) ha scritto: >> I want to find some way to put "2 dsts" in the function name, because >> as it is I can't tell just from reading. > > Might that be "write_sm4_binary_op_with_two_destinations"? Yes, although that's a bit unfortunately long. >> I'd also suggest specifying both dsts as optional hlsl_ir_node >> pointers, where NULL translates to SM4_RT_NULL. That would allow you >> to use this helper even if both dsts are used. > > Ok, good idea. Even though in later patches I am always using just one > result (and given how our IR is structured, I can't see how it can be > different), but generalizing anyway doesn't seem to hurt anybody. We'll probably want to find a way to combine things via peepholes, at least for things like div/mod and sin/cos. That's not exactly easy to do but shouldn't be too hard either. It's also not really a priority, though.