[PATCH] D66701: [ARM] Invert CSEL predicates if the opposite is a simpler constant to materialise
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 24 03:57:17 PDT 2019
dmgreen created this revision.
dmgreen added reviewers: efriedma, simon_tatham, rs, t.p.northover.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar.
Herald added a project: LLVM.
This moves ConstantMaterializationCost into ARMBaseInstrInfo so that it can also be used in ISel Lowering, adding codesize values to the computed costs, to be able to compare either approximate instruction counts or codesize costs.
It also adds a HasLowerConstantMaterializationCost, which compares the ConstantMaterializationCost of two values, returning true if the first is smaller either in instruction count/codesize, or falling back to the other in the case that they are equal.
This is used in constant CSEL lowering to invert the predicate if the opposite is easier to materialise.
https://reviews.llvm.org/D66701
Files:
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMBaseInstrInfo.h
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/csel.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66701.217015.patch
Type: text/x-patch
Size: 9458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190824/274ccd17/attachment.bin>
More information about the llvm-commits
mailing list