From 59d3ae6cdc4316ad338cd848251f33a236ccb36c Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 15 Nov 2013 01:34:59 +0000 Subject: Add addrspacecast instruction. Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Assembler/ConstantExprFoldCast.ll | 2 ++ test/Assembler/ConstantExprNoFold.ll | 3 +++ 2 files changed, 5 insertions(+) (limited to 'test/Assembler') diff --git a/test/Assembler/ConstantExprFoldCast.ll b/test/Assembler/ConstantExprFoldCast.ll index 0ce6e84..161a4ca 100644 --- a/test/Assembler/ConstantExprFoldCast.ll +++ b/test/Assembler/ConstantExprFoldCast.ll @@ -12,3 +12,5 @@ @F = global i32* inttoptr (i32 add (i32 5, i32 -5) to i32*) @G = global i32* inttoptr (i32 sub (i32 5, i32 5) to i32*) +; Address space cast AS0 null-> AS1 null +@H = global i32 addrspace(1)* addrspacecast(i32* null to i32 addrspace(1)*) diff --git a/test/Assembler/ConstantExprNoFold.ll b/test/Assembler/ConstantExprNoFold.ll index 83e8909..b41959f 100644 --- a/test/Assembler/ConstantExprNoFold.ll +++ b/test/Assembler/ConstantExprNoFold.ll @@ -21,3 +21,6 @@ target datalayout = "p:32:32" ; CHECK: @D = global i1 icmp eq (i64* getelementptr inbounds (i64* @A, i64 1), i64* getelementptr inbounds (i64* @B, i64 2)) @D = global i1 icmp eq (i64* getelementptr inbounds (i64* @A, i64 1), i64* getelementptr inbounds (i64* @B, i64 2)) + +; CHECK: @E = global i64 addrspace(1)* addrspacecast (i64* @A to i64 addrspace(1)*) +@E = global i64 addrspace(1)* addrspacecast(i64* @A to i64 addrspace(1)*) -- cgit v1.1