diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-08 22:22:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-08 22:22:53 +0000 |
commit | 363a6dfdf77ede7b8a78484a9fc0498f17718c6e (patch) | |
tree | 0e4d038cbe17f44d58a654979fb77b3f64a0c438 | |
parent | 0697ca0b138345389360367f578bbaf6ac28f8ee (diff) |
testcase for PR1314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35778 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/X86/2007-04-08-InlineAsmCrash.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2007-04-08-InlineAsmCrash.ll b/test/CodeGen/X86/2007-04-08-InlineAsmCrash.ll new file mode 100644 index 0000000000..87ff5a403a --- /dev/null +++ b/test/CodeGen/X86/2007-04-08-InlineAsmCrash.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc +; PR1314 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" +target triple = "x86_64-unknown-linux-gnu" + %struct.CycleCount = type { i64, i64 } + %struct.bc_struct = type { i32, i32, i32, i32, %struct.bc_struct*, i8*, i8* } +@_programStartTime = external global %struct.CycleCount ; <%struct.CycleCount*> [#uses=1] + +define fastcc i32 @bc_divide(%struct.bc_struct* %n1, %struct.bc_struct* %n2, %struct.bc_struct** %quot, i32 %scale) { +entry: + %tmp7.i46 = tail call i64 asm sideeffect ".byte 0x0f,0x31", "={dx},=={ax},~{dirflag},~{fpsr},~{flags}"( i64* getelementptr (%struct.CycleCount* @_programStartTime, i32 0, i32 1) ) ; <i64> [#uses=0] + %tmp221 = sdiv i32 10, 0 ; <i32> [#uses=1] + tail call fastcc void @_one_mult( i8* null, i32 0, i32 %tmp221, i8* null ) + ret i32 0 +} + +declare fastcc void @_one_mult(i8*, i32, i32, i8*) |