mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
R600: Fix segfault in R600TextureIntrinsicReplacer
This pass was segfaulting when it ran into a non-intrinsic function call. Function calls are not supported, so now instead of segfaulting, we will get an assertion failure with a nice error message. I'm not sure how to test this using lit. llvm-svn: 190076
This commit is contained in:
parent
059d9c3395
commit
b258da41d8
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user