[PATCH] D38273: [X86] Don't select (cmp (and, imm), 0) to testw
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 12:45:20 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D38273#882516, @craig.topper wrote:
> Do we have other examples of prefering i16 instructions in minsize?
Found this in X86TargetLowering::EmitCmp():
// Only promote the compare up to I32 if it is a 16 bit operation
// with an immediate. 16 bit immediates are to be avoided.
if ((Op0.getValueType() == MVT::i16 &&
(isa<ConstantSDNode>(Op0) || isa<ConstantSDNode>(Op1))) &&
!DAG.getMachineFunction().getFunction()->optForMinSize() &&
https://reviews.llvm.org/D38273
More information about the llvm-commits
mailing list