diff options
| author | Craig Topper <craig.topper@intel.com> | 2018-04-18 05:15:24 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2018-04-18 05:15:24 +0000 |
| commit | 8704612481d20934081ae8fc8be0c39b9bad89e7 (patch) | |
| tree | 9c32032daee2fa43974d1560e4b88077fe4bd8e0 /llvm/test | |
| parent | aea15131dbaeae56ab2b084a25f4e184dcfeede3 (diff) | |
| download | bcm5719-llvm-8704612481d20934081ae8fc8be0c39b9bad89e7.tar.gz bcm5719-llvm-8704612481d20934081ae8fc8be0c39b9bad89e7.zip | |
[X86] Don't crash on bad operand modifiers in inline assembly
Summary: Previously if a modifer was placed on a non-GPR register class we would hit an assert or crash.
Reviewers: echristo
Reviewed By: echristo
Subscribers: eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D45751
llvm-svn: 330238
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll b/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll new file mode 100644 index 00000000000..819b9fcfa79 --- /dev/null +++ b/llvm/test/CodeGen/X86/inline-asm-bad-modifier.ll @@ -0,0 +1,8 @@ +; RUN: not llc -mtriple=x86_64-- < %s 2>&1 | FileCheck %s + +;CHECK: error: invalid operand in inline asm: 'vmovd ${1:x}, $0' +define i32 @foo() { +entry: + %0 = tail call i32 asm sideeffect "vmovd ${1:x}, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(<2 x i64> <i64 240518168632, i64 240518168632>) + ret i32 %0 +} |

