1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/test/CodeGen/X86/inline-asm-duplicated-constraint.ll
Benjamin Kramer 40ebf4f0c7 [inline asm] Don't reject duplicated matching constraints
They're harmless and it's easy to generate them from clang, leading to
a crash in LLVM. Found by afl-fuzz.

llvm-svn: 233500
2015-03-29 20:33:07 +00:00

13 lines
348 B
LLVM

; 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
}