llvm-project/llvm/test/CodeGen/Mips/llvm-ir
Simon Dardis 250256f9c9 Reland "[mips] Fix multiprecision arithmetic."
For multiprecision arithmetic on MIPS, rather than using ISD::ADDE / ISD::ADDC,
get SelectionDAG to break down the operation into ISD::ADDs and ISD::SETCCs.

For MIPS, only the DSP ASE has a carry flag, so in the general case it is not
useful to directly support ISD::{ADDE, ADDC, SUBE, SUBC} nodes.

Also improve the generation code in such cases for targets with
TargetLoweringBase::ZeroOrOneBooleanContent by directly using the result of the
comparison node rather than using it in selects. Similarly for ISD::SUBE /
ISD::SUBC.

Address optimization breakage by moving the generation of MIPS specific integer
multiply-accumulate nodes to before legalization.

This revolves PR32713 and PR33424.

Thanks to Simonas Kazlauskas and Pirama Arumuga Nainar for reporting the issue!

Reviewers: slthakur

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

The previous version of this patch was too aggressive in producing fused
integer multiple-addition instructions.

llvm-svn: 307906
2017-07-13 11:28:05 +00:00
..
add.ll Reland "[mips] Fix multiprecision arithmetic." 2017-07-13 11:28:05 +00:00
addrspacecast.ll
and.ll [mips] interAptiv based generic schedule model 2016-09-01 14:53:53 +00:00
ashr.ll CodeGen: BlockPlacement: Reduce TriangleChainCount to 2 2017-03-16 01:32:29 +00:00
atomicrmx.ll
call.ll [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
extractelement.ll DAG: Avoid OOB when legalizing vector indexing 2017-01-10 22:02:30 +00:00
indirectbr.ll
lh_lhu.ll
load-atomic.ll
lshr.ll CodeGen: BlockPlacement: Reduce TriangleChainCount to 2 2017-03-16 01:32:29 +00:00
mul.ll evert "[mips] Fix test mips64fpldst.ll with machine verifier enabled" 2017-06-07 11:21:37 +00:00
not.ll [mips] interAptiv based generic schedule model 2016-09-01 14:53:53 +00:00
or.ll [mips] interAptiv based generic schedule model 2016-09-01 14:53:53 +00:00
ret.ll
sdiv.ll evert "[mips] Fix test mips64fpldst.ll with machine verifier enabled" 2017-06-07 11:21:37 +00:00
select-dbl.ll
select-flt.ll [mips] interAptiv based generic schedule model 2016-09-01 14:53:53 +00:00
select-int.ll [mips] interAptiv based generic schedule model 2016-09-01 14:53:53 +00:00
shl.ll CodeGen: BlockPlacement: Reduce TriangleChainCount to 2 2017-03-16 01:32:29 +00:00
sqrt.ll
srem.ll evert "[mips] Fix test mips64fpldst.ll with machine verifier enabled" 2017-06-07 11:21:37 +00:00
store-atomic.ll
sub.ll Reland "[mips] Fix multiprecision arithmetic." 2017-07-13 11:28:05 +00:00
udiv.ll evert "[mips] Fix test mips64fpldst.ll with machine verifier enabled" 2017-06-07 11:21:37 +00:00
urem.ll evert "[mips] Fix test mips64fpldst.ll with machine verifier enabled" 2017-06-07 11:21:37 +00:00
xor.ll [mips] interAptiv based generic schedule model 2016-09-01 14:53:53 +00:00