diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2013-06-26 10:55:03 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2013-06-26 10:55:03 +0000 |
commit | 87070fe1073b1e95748d987af0810d02aac43603 (patch) | |
tree | 29608b26070b26a78bd0a59f77b096fa30556407 /lib/Target | |
parent | d4429214a2dffcfd8f97956ac8b1a67c4795d242 (diff) | |
download | external_llvm-87070fe1073b1e95748d987af0810d02aac43603.zip external_llvm-87070fe1073b1e95748d987af0810d02aac43603.tar.gz external_llvm-87070fe1073b1e95748d987af0810d02aac43603.tar.bz2 |
Optimized integer vector multiplication operation by replacing it with shift/xor/sub when it is possible. Fixed a bug in SDIV, where the const operand is not a splat constant vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 7db1e47..954790b 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -11560,9 +11560,11 @@ SDValue X86TargetLowering::LowerSDIV(SDValue Op, SelectionDAG &DAG) const { return SDValue(); APInt SplatValue, SplatUndef; - unsigned MinSplatBits; + unsigned SplatBitSize; bool HasAnyUndefs; - if (!C->isConstantSplat(SplatValue, SplatUndef, MinSplatBits, HasAnyUndefs)) + if (!C->isConstantSplat(SplatValue, SplatUndef, SplatBitSize, + HasAnyUndefs) || + EltTy.getSizeInBits() < SplatBitSize) return SDValue(); if ((SplatValue != 0) && |