summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-11-19 00:33:16 +0000
committerCraig Topper <craig.topper@intel.com>2018-11-19 00:33:16 +0000
commit053f1eea96eaa8a0a4bb034274fa485655323d32 (patch)
tree627689304bdd17e3c1e2f0fcf0dc3eb0910f72f5 /llvm/lib
parenta7b204b44f8a8bd0d6adbb1a459fc5ec29d99d8d (diff)
downloadbcm5719-llvm-053f1eea96eaa8a0a4bb034274fa485655323d32.tar.gz
bcm5719-llvm-053f1eea96eaa8a0a4bb034274fa485655323d32.zip
[X86] Remove most of the SEXTLOAD Custom setOperationAction calls under -x86-experimental-vector-widening-legalization.
Leave just the v4i8->v4i64 and v8i8->v8i64, but only enable them on pre-sse4.1 targets when 64-bit mode is enabled. In those cases we end up creating sext loads that get scalarized to code that looks better than what we get from loading into a vector register and doing a multiple step sign extend using unpacks and shifts. llvm-svn: 347180
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 8c3d0d7a42d..a8859be9fb1 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -866,14 +866,11 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setLoadExtAction(ISD::EXTLOAD, VT, MVT::v8i8, Custom);
}
- if (ExperimentalVectorWideningLegalization) {
- // Explicitly code the list so we don't use narrow result types.
- setLoadExtAction(ISD::SEXTLOAD, MVT::v4i32, MVT::v4i8, Custom);
- setLoadExtAction(ISD::SEXTLOAD, MVT::v4i32, MVT::v4i16, Custom);
+ if (ExperimentalVectorWideningLegalization &&
+ !Subtarget.hasSSE41() && Subtarget.is64Bit()) {
+ // This lets DAG combine create sextloads that get split and scalarized.
+ // TODO: Does this make sense? What about v2i8->v2i64?
setLoadExtAction(ISD::SEXTLOAD, MVT::v4i64, MVT::v4i8, Custom);
- setLoadExtAction(ISD::SEXTLOAD, MVT::v4i64, MVT::v4i16, Custom);
- setLoadExtAction(ISD::SEXTLOAD, MVT::v8i16, MVT::v8i8, Custom);
- setLoadExtAction(ISD::SEXTLOAD, MVT::v8i32, MVT::v8i8, Custom);
setLoadExtAction(ISD::SEXTLOAD, MVT::v8i64, MVT::v8i8, Custom);
}
OpenPOWER on IntegriCloud