forked from OSchip/llvm-project
e1687a89e8
LLVM normally prefers to minimize the number of bits set in an AND immediate, but that doesn't always match the available ARM instructions. In Thumb1 mode, prefer uxtb or uxth where possible; otherwise, prefer a two-instruction sequence movs+ands or movs+bics. Some potential improvements outlined in ARMTargetLowering::targetShrinkDemandedConstant, but seems to work pretty well already. The ARMISelDAGToDAG fix ensures we don't generate an invalid UBFX instruction due to a larger-than-expected mask. (It's orthogonal, in some sense, but as far as I can tell it's either impossible or nearly impossible to reproduce the bug without this change.) According to my testing, this seems to consistently improve codesize by a small amount by forming bic more often for ISD::AND with an immediate. Differential Revision: https://reviews.llvm.org/D50030 llvm-svn: 339472 |
||
---|---|---|
.. | ||
2007-01-31-RegInfoAssert.ll | ||
2007-02-02-JoinIntervalsCrash.ll | ||
2007-05-05-InvalidPushPop.ll | ||
2009-06-18-ThumbCommuteMul.ll | ||
2009-07-20-TwoAddrBug.ll | ||
2009-07-27-PEIAssert.ll | ||
2009-08-12-ConstIslandAssert.ll | ||
2009-08-12-RegInfoAssert.ll | ||
2009-08-20-ISelBug.ll | ||
2009-12-17-pre-regalloc-taildup.ll | ||
2010-06-18-SibCallCrash.ll | ||
2010-07-01-FuncAlign.ll | ||
2010-07-15-debugOrdering.ll | ||
2011-05-11-DAGLegalizer.ll | ||
2011-06-16-NoGPRs.ll | ||
2011-EpilogueBug.ll | ||
2012-04-26-M0ISelBug.ll | ||
2014-06-10-thumb1-ldst-opt-bug.ll | ||
DbgValueOtherTargets.test | ||
PR17309.ll | ||
PR35481.ll | ||
PR36658.mir | ||
addr-modes.ll | ||
and_neg.ll | ||
asmprinter-bug.ll | ||
barrier.ll | ||
bic_imm.ll | ||
branchless-cmp.ll | ||
callee_save.ll | ||
cmp-add-fold.ll | ||
cmp-fold.ll | ||
constants.ll | ||
copy_thumb.ll | ||
cortex-m0-unaligned-access.ll | ||
dyn-stackalloc.ll | ||
fastcc.ll | ||
fpconv.ll | ||
fpow.ll | ||
frame-access.ll | ||
frame_thumb.ll | ||
i8-phi-ext.ll | ||
iabs.ll | ||
inlineasm-imm-thumb.ll | ||
inlineasm-thumb.ll | ||
ispositive.ll | ||
large-stack.ll | ||
ldm-merge-call.ll | ||
ldm-merge-struct.ll | ||
ldm-stm-base-materialization-thumb2.ll | ||
ldm-stm-base-materialization.ll | ||
ldm-stm-postinc.ll | ||
ldr_ext.ll | ||
ldr_frame.ll | ||
lit.local.cfg | ||
litpoolremat.ll | ||
long-setcc.ll | ||
long.ll | ||
long_shift.ll | ||
machine-cse-physreg.mir | ||
mature-mc-support.ll | ||
mul.ll | ||
mvn.ll | ||
optionaldef-scheduling.ll | ||
pop.ll | ||
pr35836.ll | ||
pr35836_2.ll | ||
push.ll | ||
remove-unneeded-push-pop.ll | ||
rev.ll | ||
segmented-stacks-dynamic.ll | ||
segmented-stacks.ll | ||
select.ll | ||
shift-and.ll | ||
sjljehprepare-lower-vector.ll | ||
stack-access.ll | ||
stack-coloring-without-frame-ptr.ll | ||
stack-frame.ll | ||
stack_guard_remat.ll | ||
stm-deprecated.ll | ||
stm-merge.ll | ||
stm-scavenging.ll | ||
tbb-reuse.mir | ||
thumb-imm.ll | ||
thumb-ldm.ll | ||
thumb-shrink-wrapping.ll | ||
thumb1-cmp.ll | ||
trap.ll | ||
triple.ll | ||
tst_teq.ll | ||
unord.ll | ||
vargs.ll |