1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/CodeGen/MSP430
Alexander Richardson dd3a0683bf Emit a left-shift instead of a power-of-two multiply for jump-tables
Summary:
SelectionDAGLegalize::ExpandNode() inserts an ISD::MUL when lowering a
BR_JT opcode. While many backends optimize this multiply into a shift, e.g.
the MIPS backend currently always lowers this into a sequence of
load-immediate+multiply+mflo in MipsSETargetLowering::lowerMulDiv().

I initially changed the multiply to a shift in the MIPS backend but it
turns out that would not have handled the MIPSR6 case and was a lot more
code than doing it in LegalizeDAG.
I believe performing this simple optimization in LegalizeDAG instead of
each individual backend is the better solution since this also fixes other
backeds such as MSP430 which calls the multiply runtime function
__mspabi_mpyi without this patch.

Reviewers: sdardis, atanasyan, pftbest, asl

Reviewed By: sdardis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D45760

llvm-svn: 332439
2018-05-16 08:58:26 +00:00
..
2009-05-10-CyclicDAG.ll
2009-05-17-Rot.ll
2009-05-17-Shift.ll
2009-05-19-DoubleSplit.ll
2009-08-25-DynamicStackAlloc.ll
2009-09-18-AbsoluteAddr.ll
2009-10-10-OrImpDef.ll
2009-11-08-InvalidResNo.ll
2009-11-20-NewNode.ll
2009-12-21-FrameAddr.ll
2009-12-22-InlineAsm.ll
2010-05-01-CombinerAnd.ll
AddrMode-bis-rx.ll
AddrMode-bis-xr.ll
AddrMode-mov-rx.ll
AddrMode-mov-xr.ll
asm-clobbers.ll
bit.ll
BranchSelector.ll [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
byval.ll
cc_args.ll
cc_ret.ll
DbgValueOtherTargets.test
flt_rounds.ll
fp.ll
hwmult16.ll
hwmult32.ll
hwmultf5.ll
indirectbr2.ll
indirectbr.ll
inline-asm.ll
Inst8mi.ll
Inst8mm.ll
Inst8mr.ll
Inst8ri.ll
Inst8rm.ll
Inst8rr.ll
Inst16mi.ll
Inst16mm.ll
Inst16mr.ll
Inst16ri.ll
Inst16rm.ll
Inst16rr.ll
jumptable.ll Emit a left-shift instead of a power-of-two multiply for jump-tables 2018-05-16 08:58:26 +00:00
libcalls.ll
lit.local.cfg
memset.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
misched-msp430.ll
mult-alt-generic-msp430.ll
postinc.ll
promote-i8-mul.ll
select-use-sr.ll
setcc.ll
shifts.ll
spill-to-stack.ll
struct_layout.ll
struct-return.ll
transient-stack-alignment.ll
umulo-16.ll
vararg.ll [DAG] Improve Aliasing of operations to static alloca 2017-07-18 20:06:24 +00:00