llvm-project/llvm/lib/CodeGen/SelectionDAG
Geoff Berry 2ddfc5e60f [DAGCombiner] Improve zextload optimization.
Summary:
Don't fold
  (zext (and (load x), cst)) -> (and (zextload x), (zext cst))
if
  (and (load x) cst)
will match as a zextload already and has additional users.

For example, the following IR:

  %load = load i32, i32* %ptr, align 8
  %load16 = and i32 %load, 65535
  %load64 = zext i32 %load16 to i64
  store i32 %load16, i32* %dst1, align 4
  store i64 %load64, i64* %dst2, align 8

used to produce the following aarch64 code:

	ldr		w8, [x0]
	and	w9, w8, #0xffff
	and	x8, x8, #0xffff
	str		w9, [x1]
	str		x8, [x2]

but with this change produces the following aarch64 code:

	ldrh		w8, [x0]
	str		w8, [x1]
	str		x8, [x2]

Reviewers: resistor, mcrosier

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14340

llvm-svn: 252789
2015-11-11 19:42:52 +00:00
..
CMakeLists.txt [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder 2014-12-02 18:50:36 +00:00
DAGCombiner.cpp [DAGCombiner] Improve zextload optimization. 2015-11-11 19:42:52 +00:00
FastISel.cpp Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add successors when optimization is disabled. 2015-10-27 17:59:36 +00:00
FunctionLoweringInfo.cpp [WinEH] Fix funclet prologues with stack realignment 2015-11-05 21:09:49 +00:00
InstrEmitter.cpp Remove unnecessary call to getAllocatableRegClass 2015-11-10 00:30:14 +00:00
InstrEmitter.h [SDAG] Give InstrEmitter hidden visibility 2015-07-01 14:55:10 +00:00
LLVMBuild.txt
LegalizeDAG.cpp LegalizeDAG: Implement promote for scalar_to_vector 2015-11-10 18:48:11 +00:00
LegalizeFloatTypes.cpp [CodeGen] Always promote f16 if not legal 2015-11-09 11:03:18 +00:00
LegalizeIntegerTypes.cpp Change makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. This removes the need to pass a hardcoded size in many places. NFC 2015-10-22 17:05:00 +00:00
LegalizeTypes.cpp Change makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. This removes the need to pass a hardcoded size in many places. NFC 2015-10-22 17:05:00 +00:00
LegalizeTypes.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
LegalizeTypesGeneric.cpp PseudoSourceValue: Replace global manager with a manager in a machine function. 2015-08-11 23:09:45 +00:00
LegalizeVectorOps.cpp Do not use "else" when both branches return (NFC) 2015-10-27 08:12:08 +00:00
LegalizeVectorTypes.cpp propagate fast-math-flags on DAG nodes 2015-09-16 16:31:21 +00:00
Makefile
ResourcePriorityQueue.cpp Fix some comment typos. 2015-08-08 18:27:36 +00:00
SDNodeDbgValue.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ScheduleDAGFast.cpp Add allnodes() iterator range to SelectionDAG. NFC. 2015-07-14 22:10:54 +00:00
ScheduleDAGRRList.cpp Convert a bunch of loops to foreach. NFC. 2015-06-26 19:18:49 +00:00
ScheduleDAGSDNodes.cpp Add allnodes() iterator range to SelectionDAG. NFC. 2015-07-14 22:10:54 +00:00
ScheduleDAGSDNodes.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
ScheduleDAGVLIW.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
SelectionDAG.cpp add a SelectionDAG method to check if no common bits are set in two nodes; NFCI 2015-11-09 23:31:38 +00:00
SelectionDAGBuilder.cpp [WinEH] Don't emit CATCHRET from visitCatchPad 2015-11-09 23:07:48 +00:00
SelectionDAGBuilder.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
SelectionDAGDumper.cpp SelectionDAG: Remove implicit ilist iterator conversions, NFC 2015-10-13 19:47:46 +00:00
SelectionDAGISel.cpp [WinEH] Update exception pointer registers 2015-11-07 01:11:31 +00:00
SelectionDAGPrinter.cpp Make the SelectionDAG graph printer use SDNode::PersistentId labels. 2015-10-27 23:09:03 +00:00
StatepointLowering.cpp [StatepointLowering] Remove distinction between call and invoke safepoints 2015-11-04 01:16:10 +00:00
StatepointLowering.h [StatepointLowering] Support of the gc.relocates for invoke statepoints. 2015-05-20 11:37:25 +00:00
TargetLowering.cpp [X86] Use correct calling convention for MCU psABI libcalls 2015-10-25 08:14:05 +00:00
TargetSelectionDAGInfo.cpp Remove getDataLayout() from TargetSelectionDAGInfo (had no users) 2015-07-09 02:10:08 +00:00