1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/CodeGen/Generic
Cong Hou 6af13323da Detecte vector reduction operations just before instruction selection.
(This is the second attemp to commit this patch, after fixing pr26652 & pr26653).

This patch detects vector reductions before instruction selection. Vector
reductions are vectorized reduction operations, and for such operations we have
freedom to reorganize the elements of the result as long as the reduction of them
stay unchanged. This will enable some reduction pattern recognition during
instruction combine such as SAD/dot-product on X86. A flag is added to
SDNodeFlags to mark those vector reduction nodes to be checked during instruction
combine.

To detect those vector reductions, we search def-use chains starting from the
given instruction, and check if all uses fall into two categories:

1. Reduction with another vector.
2. Reduction on all elements.

in which 2 is detected by recognizing the pattern that the loop vectorizer
generates to reduce all elements in the vector outside of the loop, which
includes several ShuffleVector and one ExtractElement instructions.


Differential revision: http://reviews.llvm.org/D15250

llvm-svn: 261804
2016-02-24 23:40:36 +00:00
..
2002-04-14-UnexpectedUnsignedType.ll
2002-04-16-StackFrameSizeAlignment.ll
2003-05-27-phifcmpd.ll
2003-05-27-useboolinotherbb.ll
2003-05-27-usefsubasbool.ll
2003-05-28-ManyArgs.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2003-05-30-BadFoldGEP.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2003-05-30-BadPreselectPhi.ll
2003-07-06-BadIntCmp.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2003-07-07-BadLongConst.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2003-07-08-BadCastToBool.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2003-07-29-BadConstSbyte.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2004-05-09-LiveVarPartialRegister.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2005-01-18-SetUO-InfLoop.ll
2005-04-09-GlobalInPHI.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2005-10-18-ZeroSizeStackObject.ll
2005-10-21-longlonggtu.ll
2005-12-01-Crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2005-12-12-ExpandSextInreg.ll
2006-01-12-BadSetCCFold.ll
2006-01-18-InvalidBranchOpcodeAssert.ll
2006-02-12-InsertLibcall.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-03-01-dagcombineinfloop.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-04-26-SetCCAnd.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-04-28-Sign-extend-bool.ll
2006-05-06-GEP-Cast-Sink-Crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2006-06-12-LowerSwitchCrash.ll
2006-06-13-ComputeMaskedBitsCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-06-28-SimplifySetCCCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-07-03-schedulers.ll
2006-08-30-CoalescerCrash.ll
2006-09-02-LocalAllocCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2006-09-06-SwitchLowering.ll
2006-10-27-CondFolding.ll
2006-10-29-Crash.ll
2006-11-20-DAGCombineCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-01-15-LoadSelectCycle.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-02-25-invoke.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2007-04-08-MultipleFrameIndices.ll
2007-04-13-SwitchLowerBadPhi.ll
2007-04-17-lsr-crash.ll
2007-04-27-InlineAsm-X-Dest.ll
2007-04-27-LargeMemObject.ll
2007-04-30-LandingPadBranchFolding.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2007-05-03-EHTypeInfo.ll CodeGen: @llvm.eh.typeid.for replaced @llvm.eh.typeid.for.i32 2015-03-16 21:36:38 +00:00
2007-05-15-InfiniteRecursion.ll
2007-12-17-InvokeAsm.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2007-12-31-UnusedSelector.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2008-01-25-dag-combine-mul.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-01-30-LoadCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-02-04-Ctlz.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2008-02-04-ExtractSubvector.ll
2008-02-20-MatchingMem.ll Unxfail passing test on Hexagon 2015-03-12 20:38:10 +00:00
2008-02-25-NegateZero.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2008-02-26-NegatableCrash.ll
2008-08-07-PtrToInt-SmallerInt.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2009-03-17-LSR-APInt.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2009-03-29-SoftFloatVectorExtract.ll Migrate existing backends that care about software floating point 2015-05-12 01:26:05 +00:00
2009-04-10-SinkCrash.ll
2009-04-28-i128-cmp-crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-11-16-BadKillsCrash.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2010-07-27-DAGCombineCrash.ll
2010-11-04-BigByval.ll
2010-ZeroSizedArg.ll
2011-01-06-BigNumberCrash.ll
2011-07-07-ScheduleDAGCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2012-06-08-APIntCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2013-03-20-APFloatCrash.ll
2014-02-05-OpaqueConstants.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
add-with-overflow-24.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
add-with-overflow-128.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
add-with-overflow.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
addr-label.ll
annotate.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
APIntLoadStore.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
APIntParam.ll
APIntSextParam.ll
APIntZextParam.ll
asm-large-immediate.ll
assume.ll
badarg6.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
badCallArgLRLLVM.ll
badFoldGEP.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
BasicInstrs.ll
bool-to-double.ll
builtin-expect.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
call2-ret0.ll
call-ret0.ll
call-ret42.ll
call-void.ll
cast-fp.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ConstantExprLowering.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
constindices.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
dag-combine-crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
dbg_value.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
div-neg-power-2.ll
donothing.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
edge-bundles-blockIDs.ll
empty-insertvalue.ll Fix crash with an insertvalue that produces an empty object. 2014-09-20 00:10:47 +00:00
empty-load-store.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
empty-phi.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
exception-handling.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
externally_available.ll
fastcall.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
fneg-fabs.ll
ForceStackAlign.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
fp_to_int.ll
fp-to-int-invalid.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
fpowi-promote.ll
fwdtwice.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
global-ret0.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
hello.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
i128-addsub.ll
i128-arith.ll
icmp-illegal.ll Fix icmp lowering 2015-05-20 17:21:09 +00:00
inline-asm-mem-clobber.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
inline-asm-special-strings.ll
intrinsics.ll
invalid-memcpy.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
isunord.ll
lit.local.cfg Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
llvm-ct-intrinsics.ll
MachineBranchProb.ll Unxfail passing testcase on Hexagon 2016-01-14 15:24:15 +00:00
multiple-return-values-cross-block-with-invoke.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
negintconst.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
nested-select.ll
no-target.ll
overflow.ll
overloaded-intrinsic-name.ll [gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type 2015-12-26 07:54:32 +00:00
PBQP.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
pr2625.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
pr3288.ll
pr12507.ll
pr26652.ll Detecte vector reduction operations just before instruction selection. 2016-02-24 23:40:36 +00:00
print-add.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
print-after.ll
print-arith-fp.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
print-arith-int.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
print-int.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
print-machineinstrs.ll Rename argument strings of codegen passes to avoid collisions with command line 2014-12-13 04:52:04 +00:00
print-mul-exp.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
print-mul.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
print-shift.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ptr-annotate.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
ret0.ll
ret42.ll
run-pass.ll llc: Add a 'run-pass' option. 2015-07-06 17:44:26 +00:00
select-cc.ll
select.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
shift-int64.ll
stacksave-restore.ll
stop-after.ll Resubmit r237954 (MIR Serialization: print and parse LLVM IR using MIR format). 2015-05-27 18:02:19 +00:00
storetrunc-fp.ll
switch-lower-feature.ll
switch-lower.ll
trap.ll
undef-phi.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
v-split.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
vector-casts.ll whitespace tidyup. NFC. 2015-07-03 08:02:12 +00:00
vector-constantexpr.ll
vector-identity-shuffle.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
vector-redux.ll Detecte vector reduction operations just before instruction selection. 2016-02-24 23:40:36 +00:00
vector.ll Fix assert in X86 backend. 2015-10-09 20:10:14 +00:00
zero-sized-array.ll