summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-10-13 05:47:47 +0000
committerCraig Topper <craig.topper@intel.com>2019-10-13 05:47:47 +0000
commitbf57aa2b25c54a30246cd87addfdb90529908fd3 (patch)
tree93fd643347b7c5b0f4ae1732a79597a1b30e6666 /llvm/lib/Target
parent8fe8adb9f192c84513c06ddabd3c7f013b21aabe (diff)
downloadbcm5719-llvm-bf57aa2b25c54a30246cd87addfdb90529908fd3.tar.gz
bcm5719-llvm-bf57aa2b25c54a30246cd87addfdb90529908fd3.zip
[X86] Enable v4i32->v4i16 and v8i16->v8i8 saturating truncates to use pack instructions with avx512.
llvm-svn: 374705
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c7d90ddfc9a..8d538198aef 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -39871,6 +39871,7 @@ static SDValue combineTruncateWithSat(SDValue In, EVT VT, const SDLoc &DL,
// registers, we should go ahead and use the pack instructions if possible.
bool PreferAVX512 = ((Subtarget.hasAVX512() && InSVT == MVT::i32) ||
(Subtarget.hasBWI() && InSVT == MVT::i16)) &&
+ (InVT.getSizeInBits() > 128) &&
(Subtarget.hasVLX() || InVT.getSizeInBits() > 256) &&
!(!Subtarget.useAVX512Regs() && VT.getSizeInBits() >= 256);
OpenPOWER on IntegriCloud