[PATCH] D57389: [X86] Improve use of SHLD/SHRD
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 19:40:53 PST 2019
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:37054
+ ShAmt1Op1 = ShAmt1Op1.getOperand(0);
+ }
if (ShAmt1Op1.getOpcode() == ISD::TRUNCATE)
----------------
deadalnix wrote:
> RKSimon wrote:
> > Maybe use DAG.GetDemandedBits ?
> It's not obvious to me that it would work. The and opcode itself uses it, so there is no need to redo it here. We also need to know if masking took place to know what we can accept as LHS for the sub opcode.
I know this code (Bits - 1) check is used in other places earlier in this function, but is that valid for i16 SHLD/SHRD? SHLD/SHRD hardware mask shift amount to 5 bits on i16/i32 and 6 bits on i64.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57389/new/
https://reviews.llvm.org/D57389
More information about the llvm-commits
mailing list