[PATCH] D69499: [X86] Narrow i64 compares with constant to i32 when the upper 32-bits are known zero.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 05:10:35 PDT 2019
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:20187
+ cast<ConstantSDNode>(Op1)->getAPIntValue().getActiveBits() <= 32 &&
+ DAG.MaskedValueIsZero(Op0, APInt::getHighBitsSet(64, 32))) {
+ CmpVT = MVT::i32;
----------------
craig.topper wrote:
> RKSimon wrote:
> > Do the equivalent for signed with ComputeNumSignBits?
> I tried, but it affected no lit tests.
Fair enough - add a FIXME if you think its worth it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69499/new/
https://reviews.llvm.org/D69499
More information about the llvm-commits
mailing list