They're harmless and it's easy to generate them from clang, leading to
a crash in LLVM. Found by afl-fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233500
91177308-0d34-0410-b5e6-
96231b3b80d8
// Note that operand #n has a matching input.
scInfo.MatchingInput = ConstraintsSoFar.size();
} else {
- if (ConstraintsSoFar[N].hasMatchingInput())
+ if (ConstraintsSoFar[N].hasMatchingInput() &&
+ ConstraintsSoFar[N].MatchingInput != ConstraintsSoFar.size())
return true;
// Note that operand #n has a matching input.
ConstraintsSoFar[N].MatchingInput = ConstraintsSoFar.size();
--- /dev/null
+; RUN: llc < %s -march=x86-64 -no-integrated-as -mtriple=x86_64-linux-gnu | FileCheck %s
+
+; CHECK-LABEL: test1:
+; CHECK: movl (%rdi), %eax
+; CHECK: nop
+; CHECK: movl %eax, (%rdi)
+; CHECK: ret
+define void @test1(i32* %l) {
+ %load = load i32, i32* %l
+ call void asm "nop", "=*rmrm,0m0m,~{dirflag},~{fpsr},~{flags}"(i32* %l, i32 %load)
+ ret void
+}