projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
R600: Fix segfault in R600TextureIntrinsicReplacer
[oota-llvm.git]
/
lib
/
Target
/
R600
/
R600TextureIntrinsicsReplacer.cpp
diff --git
a/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp
b/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp
index 37d90596bd88150f74ad85d265b2930cb9617679..d4b8ec01c5512906e013467e3844ed80f9ba838f 100644
(file)
--- a/
lib/Target/R600/R600TextureIntrinsicsReplacer.cpp
+++ b/
lib/Target/R600/R600TextureIntrinsicsReplacer.cpp
@@
-260,6
+260,9
@@
public:
}
void visitCallInst(CallInst &I) {
+ if (!I.getCalledFunction()) {
+ return;
+ }
StringRef Name = I.getCalledFunction()->getName();
if (Name == "llvm.AMDGPU.tex") {
ReplaceTexIntrinsic(I, false, TexSign, "llvm.R600.tex", "llvm.R600.texc");