[PATCH] D15902: AMDGPU/SI: Fix crash when inline assembly is used in a graphics shader
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 6 14:04:46 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL256980: AMDGPU/SI: Fix crash when inline assembly is used in a graphics shader (authored by nha).
Changed prior to commit:
http://reviews.llvm.org/D15902?vs=44052&id=44157#toc
Repository:
rL LLVM
http://reviews.llvm.org/D15902
Files:
llvm/trunk/lib/Target/AMDGPU/SITypeRewriter.cpp
llvm/trunk/test/CodeGen/AMDGPU/inline-asm.ll
Index: llvm/trunk/lib/Target/AMDGPU/SITypeRewriter.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SITypeRewriter.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SITypeRewriter.cpp
@@ -98,6 +98,9 @@
SmallVector <Type*, 8> Types;
bool NeedToReplace = false;
Function *F = I.getCalledFunction();
+ if (!F)
+ return;
+
std::string Name = F->getName();
for (unsigned i = 0, e = I.getNumArgOperands(); i != e; ++i) {
Value *Arg = I.getArgOperand(i);
Index: llvm/trunk/test/CodeGen/AMDGPU/inline-asm.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/inline-asm.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/inline-asm.ll
@@ -10,3 +10,14 @@
call void asm sideeffect "s_endpgm", ""()
ret void
}
+
+; CHECK: {{^}}inline_asm_shader:
+; CHECK: s_endpgm
+; CHECK: s_endpgm
+define void @inline_asm_shader() #0 {
+entry:
+ call void asm sideeffect "s_endpgm", ""()
+ ret void
+}
+
+attributes #0 = { "ShaderType"="0" }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15902.44157.patch
Type: text/x-patch
Size: 1033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160106/abd690a9/attachment.bin>
More information about the llvm-commits
mailing list