summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/2009-01-16-PointerAddrSpace.ll2
-rw-r--r--test/Transforms/InstCombine/2012-07-30-addrsp-bitcast.ll4
-rw-r--r--test/Transforms/InstCombine/cast_ptr.ll2
-rw-r--r--test/Transforms/InstCombine/constant-fold-address-space-pointer.ll4
-rw-r--r--test/Transforms/InstCombine/gep-addrspace.ll2
-rw-r--r--test/Transforms/InstCombine/objsize-address-space.ll2
6 files changed, 8 insertions, 8 deletions
diff --git a/test/Transforms/InstCombine/2009-01-16-PointerAddrSpace.ll b/test/Transforms/InstCombine/2009-01-16-PointerAddrSpace.ll
index 949fc59220..e3543116a6 100644
--- a/test/Transforms/InstCombine/2009-01-16-PointerAddrSpace.ll
+++ b/test/Transforms/InstCombine/2009-01-16-PointerAddrSpace.ll
@@ -5,7 +5,7 @@ target triple = "i386-apple-darwin9.6"
define i32 @test(i32* %P) nounwind {
entry:
- %Q = bitcast i32* %P to i32 addrspace(1)*
+ %Q = addrspacecast i32* %P to i32 addrspace(1)*
store i32 0, i32 addrspace(1)* %Q, align 4
ret i32 0
}
diff --git a/test/Transforms/InstCombine/2012-07-30-addrsp-bitcast.ll b/test/Transforms/InstCombine/2012-07-30-addrsp-bitcast.ll
index 6f3df5b2fd..4d185bf7e0 100644
--- a/test/Transforms/InstCombine/2012-07-30-addrsp-bitcast.ll
+++ b/test/Transforms/InstCombine/2012-07-30-addrsp-bitcast.ll
@@ -1,10 +1,10 @@
; RUN: opt < %s -instcombine -S | FileCheck %s
-; CHECK: bitcast
+; CHECK: addrspacecast
@base = internal addrspace(3) unnamed_addr global [16 x i32] zeroinitializer, align 16
declare void @foo(i32*)
define void @test() nounwind {
- call void @foo(i32* getelementptr (i32* bitcast ([16 x i32] addrspace(3)* @base to i32*), i64 2147483647)) nounwind
+ call void @foo(i32* getelementptr (i32* addrspacecast ([16 x i32] addrspace(3)* @base to i32*), i64 2147483647)) nounwind
ret void
}
diff --git a/test/Transforms/InstCombine/cast_ptr.ll b/test/Transforms/InstCombine/cast_ptr.ll
index d415810694..23006a8460 100644
--- a/test/Transforms/InstCombine/cast_ptr.ll
+++ b/test/Transforms/InstCombine/cast_ptr.ll
@@ -100,7 +100,7 @@ define %unop* @test5(%op* %O) {
define i8 @test6(i8 addrspace(1)* %source) {
entry:
- %arrayidx223 = bitcast i8 addrspace(1)* %source to i8*
+ %arrayidx223 = addrspacecast i8 addrspace(1)* %source to i8*
%tmp4 = load i8* %arrayidx223
ret i8 %tmp4
; CHECK-LABEL: @test6(
diff --git a/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll b/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll
index f3a474a851..9f21d5419b 100644
--- a/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll
+++ b/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll
@@ -32,10 +32,10 @@ define i32 addrspace(2)* @test_constant_fold_inttoptr_as_pointer_smaller() {
}
; Different address spaces that are the same size, but they are
-; different so there should be a bitcast.
+; different so nothing should happen
define i32 addrspace(4)* @test_constant_fold_inttoptr_as_pointer_smaller_different_as() {
; CHECK-LABEL: @test_constant_fold_inttoptr_as_pointer_smaller_different_as(
-; CHECK-NEXT: ret i32 addrspace(4)* bitcast (i32 addrspace(3)* @const_zero_i32_as3 to i32 addrspace(4)*)
+; CHECK-NEXT: ret i32 addrspace(4)* inttoptr (i16 ptrtoint (i32 addrspace(3)* @const_zero_i32_as3 to i16) to i32 addrspace(4)*)
%x = ptrtoint i32 addrspace(3)* @const_zero_i32_as3 to i16
%y = inttoptr i16 %x to i32 addrspace(4)*
ret i32 addrspace(4)* %y
diff --git a/test/Transforms/InstCombine/gep-addrspace.ll b/test/Transforms/InstCombine/gep-addrspace.ll
index dfe12dbfaf..24c355d817 100644
--- a/test/Transforms/InstCombine/gep-addrspace.ll
+++ b/test/Transforms/InstCombine/gep-addrspace.ll
@@ -9,7 +9,7 @@ target triple = "x86_64-pc-win32"
define void @func(%myStruct addrspace(1)* nocapture %p) nounwind {
ST:
%A = getelementptr inbounds %myStruct addrspace(1)* %p, i64 0
- %B = bitcast %myStruct addrspace(1)* %A to %myStruct*
+ %B = addrspacecast %myStruct addrspace(1)* %A to %myStruct*
%C = getelementptr inbounds %myStruct* %B, i32 0, i32 1
%D = getelementptr inbounds [3 x float]* %C, i32 0, i32 2
%E = load float* %D, align 4
diff --git a/test/Transforms/InstCombine/objsize-address-space.ll b/test/Transforms/InstCombine/objsize-address-space.ll
index e3723ce054..9cb6884239 100644
--- a/test/Transforms/InstCombine/objsize-address-space.ll
+++ b/test/Transforms/InstCombine/objsize-address-space.ll
@@ -49,7 +49,7 @@ define i32 @array_as2_size() {
define i32 @pointer_array_as1() {
; CHECK-LABEL: @pointer_array_as1(
; CHECK-NEXT: ret i32 80
- %bc = bitcast [10 x i32 addrspace(1)*]* @array_as1_pointers to i8 addrspace(1)*
+ %bc = addrspacecast [10 x i32 addrspace(1)*]* @array_as1_pointers to i8 addrspace(1)*
%1 = call i32 @llvm.objectsize.i32.p1i8(i8 addrspace(1)* %bc, i1 false)
ret i32 %1
}