summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/dsp-patterns.ll
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2017-07-13 11:28:05 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2017-07-13 11:28:05 +0000
commit250256f9c95750ad63ee5a2d22cc6a22380ec9e9 (patch)
tree24e1120db9486d157b7dc2d1903337bab1ae125e /llvm/test/CodeGen/Mips/dsp-patterns.ll
parent10db8ce290a82b68230add5126634e82c9f90c99 (diff)
downloadbcm5719-llvm-250256f9c95750ad63ee5a2d22cc6a22380ec9e9.tar.gz
bcm5719-llvm-250256f9c95750ad63ee5a2d22cc6a22380ec9e9.zip
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
Diffstat (limited to 'llvm/test/CodeGen/Mips/dsp-patterns.ll')
-rw-r--r--llvm/test/CodeGen/Mips/dsp-patterns.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/Mips/dsp-patterns.ll b/llvm/test/CodeGen/Mips/dsp-patterns.ll
index 837c0d8bfc5..250d3eff37d 100644
--- a/llvm/test/CodeGen/Mips/dsp-patterns.ll
+++ b/llvm/test/CodeGen/Mips/dsp-patterns.ll
@@ -1,5 +1,5 @@
-; RUN: llc -march=mips -mattr=dsp < %s | FileCheck %s -check-prefix=R1
-; RUN: llc -march=mips -mattr=dspr2 < %s | FileCheck %s -check-prefix=R2
+; RUN: llc -march=mips -mcpu=mips32r2 -mattr=dsp < %s | FileCheck %s -check-prefix=R1
+; RUN: llc -march=mips -mcpu=mips32r2 -mattr=dspr2 < %s | FileCheck %s -check-prefix=R2
; R1-LABEL: test_lbux:
; R1: lbux ${{[0-9]+}}
OpenPOWER on IntegriCloud