[PATCH] D25485: [x86] use 'neg' for negation of bool

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 10:03:49 PDT 2016


spatel added a comment.

In https://reviews.llvm.org/D25485#569347, @sdardis wrote:

> As Daniel pointed out, you can use subtraction in that case. The produced assembly from that selection dag patch is actually better than what we're currently getting in terms of size as li16, subu16 are 16 bits each, the two constant shifts are 32bits each. The optimal case would be to use a 32bit microMIPS instruction with the register $zero (better than current in terms of size and # instructions). The new instruction pattern for microMIPS should be easy to fold away.


Ah, so if the LegalizeDAG patch is an improvement anyway (if not always optimal) for MIPS, then I'll update this patch to use that along with all of the regression test updates.


https://reviews.llvm.org/D25485





More information about the llvm-commits mailing list