[llvm] r194553 - Add a test case to verify that misusing anyregcc crashes as expected.

Sean Silva silvas at purdue.edu
Tue Nov 12 20:56:28 PST 2013


Awesome! Thanks for bulletproofing this API.

-- Sean Silva


On Tue, Nov 12, 2013 at 10:46 PM, Andrew Trick <atrick at apple.com> wrote:

> Author: atrick
> Date: Tue Nov 12 21:46:19 2013
> New Revision: 194553
>
> URL: http://llvm.org/viewvc/llvm-project?rev=194553&view=rev
> Log:
> Add a test case to verify that misusing anyregcc crashes as expected.
>
> Added:
>     llvm/trunk/test/CodeGen/X86/anyregcc-crash.ll
>
> Added: llvm/trunk/test/CodeGen/X86/anyregcc-crash.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/anyregcc-crash.ll?rev=194553&view=auto
>
> ==============================================================================
> --- llvm/trunk/test/CodeGen/X86/anyregcc-crash.ll (added)
> +++ llvm/trunk/test/CodeGen/X86/anyregcc-crash.ll Tue Nov 12 21:46:19 2013
> @@ -0,0 +1,17 @@
> +; RUN: not llc < %s -mtriple=x86_64-apple-darwin 2>&1 | FileCheck %s
> +;
> +; Check that misuse of anyregcc results in a compile time error.
> +
> +; CHECK: LLVM ERROR: ran out of registers during register allocation
> +define i64 @anyreglimit(i64 %v1, i64 %v2, i64 %v3, i64 %v4, i64 %v5, i64
> %v6,
> +                        i64 %v7, i64 %v8, i64 %v9, i64 %v10, i64 %v11,
> i64 %v12,
> +                        i64 %v13, i64 %v14, i64 %v15, i64 %v16) {
> +entry:
> +  %result = tail call anyregcc i64 (i32, i32, i8*, i32, ...)*
> @llvm.experimental.patchpoint.i64(i32 12, i32 15, i8* inttoptr (i64 0 to
> i8*), i32 16,
> +                i64 %v1, i64 %v2, i64 %v3, i64 %v4, i64 %v5, i64 %v6,
> +                i64 %v7, i64 %v8, i64 %v9, i64 %v10, i64 %v11, i64 %v12,
> +                i64 %v13, i64 %v14, i64 %v15, i64 %v16)
> +  ret i64 %result
> +}
> +
> +declare i64 @llvm.experimental.patchpoint.i64(i32, i32, i8*, i32, ...)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131112/dc83805a/attachment.html>


More information about the llvm-commits mailing list