summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2014-12-28 15:20:57 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2014-12-28 15:20:57 +0000
commitfd22c6693bf9f7b0daf6f3e5b96c92e7db4efcc6 (patch)
tree8848fa8d21de71927046094da3cdb36e77116709 /llvm/lib
parent683c3cde435205f94cf611066be8097c0eb1f0b5 (diff)
downloadbcm5719-llvm-fd22c6693bf9f7b0daf6f3e5b96c92e7db4efcc6.tar.gz
bcm5719-llvm-fd22c6693bf9f7b0daf6f3e5b96c92e7db4efcc6.zip
[X86][ISel] Fix a regression I introduced in r224884
The else case ResultReg was not checked for validity. To my surprise, this case was not hit in any of the existing test cases. This includes a new test cases that tests this path. Also drop the `target triple` declaration from the original test as suggested by H.J. Lu, because apparently with it the test won't be run on Linux llvm-svn: 224901
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 4af856c5622..d4459eec8ba 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -2709,15 +2709,15 @@ bool X86FastISel::fastLowerCall(CallLoweringInfo &CLI) {
ResultReg =
fastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1);
-
- if (!ResultReg)
- return false;
} else {
if (!isTypeLegal(Val->getType(), VT))
return false;
ResultReg = getRegForValue(Val);
}
+ if (!ResultReg)
+ return false;
+
ArgRegs.push_back(ResultReg);
OutVTs.push_back(VT);
}
OpenPOWER on IntegriCloud