projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfc9061
)
[PowerPC] fix up in sign-/zero-extension elimination
author
Hiroshi Inoue
<inouehrs@jp.ibm.com>
Mon, 16 Oct 2017 12:11:15 +0000
(12:11 +0000)
committer
Hiroshi Inoue
<inouehrs@jp.ibm.com>
Mon, 16 Oct 2017 12:11:15 +0000
(12:11 +0000)
This patch fixes a potential problem in my previous commit (https://reviews.llvm.org/rL315888) by adding a null check.
llvm-svn: 315900
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
index
9da20d9
..
b4da2d6
100644
(file)
--- a/
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@
-2256,6
+2256,8
@@
PPCInstrInfo::isSignOrZeroExtended(const MachineInstr &MI, bool SignExt,
if (CallMI.isCall() && CallMI.getOperand(0).isGlobal()) {
const Function *CalleeFn =
dyn_cast<Function>(CallMI.getOperand(0).getGlobal());
+ if (!CalleeFn)
+ return false;
const IntegerType *IntTy =
dyn_cast<IntegerType>(CalleeFn->getReturnType());
const AttributeSet &Attrs =