OSDN Git Service

AMDGPU: Fix crash on illegal type for inlineasm
[android-x86/external-llvm.git] / lib / Target / AMDGPU / SIISelLowering.cpp
index 79953b7..61f1927 100644 (file)
@@ -4172,6 +4172,8 @@ std::pair<unsigned, const TargetRegisterClass *>
 SITargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
                                                StringRef Constraint,
                                                MVT VT) const {
+  if (!isTypeLegal(VT))
+    return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT);
 
   if (Constraint.size() == 1) {
     switch (Constraint[0]) {