diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-06-18 20:49:40 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-06-18 20:49:40 +0000 |
commit | b2a70564a753d0992cda953e55a51fb1dcc2a9a4 (patch) | |
tree | 6d9e3e31ece756e39442b0c1b91163018bc17b54 /llvm/lib/Target/ARM/ARMISelLowering.cpp | |
parent | 3025f2366fd1b4e57f17110be39e352d52267b2c (diff) | |
download | bcm5719-llvm-b2a70564a753d0992cda953e55a51fb1dcc2a9a4.tar.gz bcm5719-llvm-b2a70564a753d0992cda953e55a51fb1dcc2a9a4.zip |
Converted an overly aggressive assert to a conditional check in AddCombineTo64bitMLAL.
Said assert assumes that ADDC will always have a glue node as its second
argument and is checked before we even know that we are actually performing the
relevant MLAL optimization. This is incorrect since on ARM we *CAN* codegen ADDC
with a use list based second argument. Thus to have both effects, I converted
the assert to a conditional check which if it fails we do not perform the
optimization.
In terms of tests I can not produce an ADDC from the IR level until I get in my
multiprecision optimization patch which is forthcoming. The tests for said patch
would cause this assert to fail implying that said tests will provide the
relevant tests.
llvm-svn: 184230
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index ec0e9c2b54d..015b023dca1 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -7948,8 +7948,11 @@ static SDValue AddCombineTo64bitMLAL(SDNode *AddcNode, assert(AddcNode->getNumValues() == 2 && AddcNode->getValueType(0) == MVT::i32 && - AddcNode->getValueType(1) == MVT::Glue && - "Expect ADDC with two result values: i32, glue"); + "Expect ADDC with two result values. First: i32"); + + // Check that we have a glued ADDC node. + if (AddcNode->getValueType(1) != MVT::Glue) + return SDValue(); // Check that the ADDC adds the low result of the S/UMUL_LOHI. if (AddcOp0->getOpcode() != ISD::UMUL_LOHI && |